Просмотр исходного кода

"查询充值提现"接口增加入参

zhou.xiaoning 3 лет назад
Родитель
Сommit
f4b7acd888
5 измененных файлов с 53 добавлено и 5 удалено
  1. 9 5
      controllers/qhj/qryQhj.go
  2. 12 0
      docs/docs.go
  3. 12 0
      docs/swagger.json
  4. 8 0
      docs/swagger.yaml
  5. 12 0
      models/qhj.go

+ 9 - 5
controllers/qhj/qryQhj.go

@@ -332,6 +332,8 @@ func QuerySiteColumnDetail(c *gin.Context) {
 // @Param begindate query string false "申请起始日期(格式yyyymmdd)"
 // @Param enddate query string false "申请截止日期(格式yyyymmdd)"
 // @Param likename query string false "模糊搜索名称"
+// @Param applystatus query int false "状态 1-待审核 2-审核通过 3-审核拒绝"
+// @Param querytype query int false "查询类型 1-提现(出金) 2-充值(出金)"
 // @Success 200 {array} models.QhjAccountOutInApply
 // @Failure 500 {object} app.Response
 // @Router /Qhj/QueryAccountInOutApply [get]
@@ -339,10 +341,12 @@ func QuerySiteColumnDetail(c *gin.Context) {
 func QueryAccountInOutApply(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		USERID    int64  `form:"userid"`    // 用户id
-		BEGINDATE string `form:"begindate"` // 开始申请日期
-		ENDDATE   string `form:"enddate"`   // 结束申请日期
-		LIKENAME  string `form:"likename"`  // 模糊搜索名称
+		USERID      int64  `form:"userid"`      // 用户id
+		BEGINDATE   string `form:"begindate"`   // 开始申请日期
+		ENDDATE     string `form:"enddate"`     // 结束申请日期
+		LIKENAME    string `form:"likename"`    // 模糊搜索名称
+		APPLYSTATUS int32  `form:"applystatus"` // 状态 1-待审核 2-审核通过 3-审核拒绝
+		QUERYTYPE   int32  `form:"querytype"`   // 查询类型
 	}{}
 	a.DoBindReq(&req)
 	a.CheckParamF(func() bool {
@@ -364,7 +368,7 @@ func QueryAccountInOutApply(c *gin.Context) {
 		}
 		return true
 	})
-	m := models.QhjAccountOutInApply{USERID: req.USERID, BeginDate: req.BEGINDATE, EndDate: req.ENDDATE, FilterName: req.LIKENAME}
+	m := models.QhjAccountOutInApply{USERID: req.USERID, BeginDate: req.BEGINDATE, EndDate: req.ENDDATE, FilterName: req.LIKENAME, APPLYSTATUS: req.APPLYSTATUS, QUERYTYPE: req.QUERYTYPE}
 	a.DoGetDataI(&m)
 }
 

+ 12 - 0
docs/docs.go

@@ -9402,6 +9402,18 @@ var doc = `{
                         "description": "模糊搜索名称",
                         "name": "likename",
                         "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "状态 1-待审核 2-审核通过 3-审核拒绝",
+                        "name": "applystatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "查询类型 1-提现(出金) 2-充值(出金)",
+                        "name": "querytype",
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 12 - 0
docs/swagger.json

@@ -9386,6 +9386,18 @@
                         "description": "模糊搜索名称",
                         "name": "likename",
                         "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "状态 1-待审核 2-审核通过 3-审核拒绝",
+                        "name": "applystatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "查询类型 1-提现(出金) 2-充值(出金)",
+                        "name": "querytype",
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 8 - 0
docs/swagger.yaml

@@ -27860,6 +27860,14 @@ paths:
         in: query
         name: likename
         type: string
+      - description: 状态 1-待审核 2-审核通过 3-审核拒绝
+        in: query
+        name: applystatus
+        type: integer
+      - description: 查询类型 1-提现(出金) 2-充值(出金)
+        in: query
+        name: querytype
+        type: integer
       produces:
       - application/json
       responses:

+ 12 - 0
models/qhj.go

@@ -1555,6 +1555,9 @@ type QhjAccountOutInApply struct {
 	BeginDate  string `json:"-"` // 开始日期(yyyymmdd)
 	EndDate    string `json:"-"` // 结束日期(yyyymmdd)
 	FilterName string `json:"-"` // 账户(模糊匹配)
+
+	QUERYTYPE int32 `json:"-"` // 查询类型 1-提现 2-充值
+	STATUS    int32 `json:"-"` // 查询状态 1-待审核 2-审核通过 3-审核拒绝
 }
 
 func (r *QhjAccountOutInApply) calc() {
@@ -1617,6 +1620,15 @@ func (r *QhjAccountOutInApply) buildSql() string {
 		"  LEFT JOIN tmp on u.userid=tmp.userid" +
 		" WHERE 1 = 1"
 	sqlId.And("u.userid", r.USERID)
+	sqlId.AndEx("t.EXECUTETYPE", r.QUERYTYPE, r.QUERYTYPE > 0)
+	switch r.STATUS {
+	case 1:
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", InStr(1, 2))
+	case 2:
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", InStr(11, 18, 24, 25))
+	case 3:
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", InStr(3, 12, 21))
+	}
 	if len(r.BeginDate) > 0 {
 		sqlId.Join(fmt.Sprintf(" and t.UPDATETIME >= to_date(%v,'yyyymmdd')", r.BeginDate))
 	}