소스 검색

"查询托管银行扩展配置信息"接口增加入参

zhou.xiaoning 2 년 전
부모
커밋
937cb77bc1
6개의 변경된 파일28개의 추가작업 그리고 10개의 파일을 삭제
  1. 4 3
      controllers/bank/bank.go
  2. 4 4
      controllers/guangzuan/tradeService.go
  3. 6 0
      docs/docs.go
  4. 6 0
      docs/swagger.json
  5. 4 0
      docs/swagger.yaml
  6. 4 3
      models/bank.go

+ 4 - 3
controllers/bank/bank.go

@@ -11,9 +11,10 @@ import (
 // @Summary  查询托管银行扩展配置信息
 // @Produce  json
 // @Security ApiKeyAuth
-// @Param    cusbankid query    string true "托管银行编号"
-// @Success  200       {array}  models.Bankcusbankextendconfig
-// @Failure  500       {object} app.Response
+// @Param    cusbankid     query    string true  "托管银行编号"
+// @Param    extendbiztype query    int    false "扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改"
+// @Success  200           {array}  models.Bankcusbankextendconfig
+// @Failure  500           {object} app.Response
 // @Router   /Bank/QueryBankCusBankExtendConfigs [get]
 // @Tags     银行
 func QueryBankCusBankExtendConfigs(c *gin.Context) {

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 6 - 0
docs/docs.go

@@ -38,6 +38,12 @@ const docTemplate = `{
                         "name": "cusbankid",
                         "in": "query",
                         "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改",
+                        "name": "extendbiztype",
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 6 - 0
docs/swagger.json

@@ -29,6 +29,12 @@
                         "name": "cusbankid",
                         "in": "query",
                         "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改",
+                        "name": "extendbiztype",
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 4 - 0
docs/swagger.yaml

@@ -29197,6 +29197,10 @@ paths:
         name: cusbankid
         required: true
         type: string
+      - description: 扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改
+        in: query
+        name: extendbiztype
+        type: integer
       produces:
       - application/json
       responses:

+ 4 - 3
models/bank.go

@@ -8,7 +8,7 @@ import (
 // Bankcusbankextendconfig 托管银行扩展配置表
 type Bankcusbankextendconfig struct {
 	CUSBANKID     string `json:"cusbankid" xorm:"CUSBANKID" form:"cusbankid" binding:"required"` // 托管银行编号
-	EXTENDBIZTYPE int32  `json:"extendbiztype" xorm:"EXTENDBIZTYPE"`                             // 扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改
+	EXTENDBIZTYPE int32  `json:"extendbiztype" xorm:"EXTENDBIZTYPE" form:"extendbiztype"`        // 扩展业务类型 - 1:签约 2:入金 3:出金 4:签约信息修改
 	FIELDID       int64  `json:"fieldid" xorm:"FIELDID"`                                         // 字段ID
 	ISMANDATORY   int32  `json:"ismandatory" xorm:"ISMANDATORY"`                                 // 是否必填 - 0:不必填 1:必填
 
@@ -36,9 +36,10 @@ func (r *Bankcusbankextendconfig) buildSql() string {
 	FROM Bank_Cusbankextendconfig t
 	LEFT JOIN BANK_EXTENDFIELD e ON
 		e.fieldid = t.fieldid
-	WHERE t.cusbankid = '%v'
+	WHERE 1=1
 	`
-	sqlId.FormatParam(r.CUSBANKID)
+	sqlId.And("t.cusbankid", r.CUSBANKID)
+	sqlId.AndEx("t.extendbiztype", r.EXTENDBIZTYPE, r.EXTENDBIZTYPE > 0)
 
 	return sqlId.String()
 }