Selaa lähdekoodia

1.增加查询企业配置接口
2.增加查询经纪人接口(pcweb)

zou.yingbin 4 vuotta sitten
vanhempi
commit
1f1c343348
8 muutettua tiedostoa jossa 987 lisäystä ja 0 poistoa
  1. 16 0
      controllers/qhj/qryQhj.go
  2. 19 0
      controllers/qhjPCWeb/qryQhjPCWeb.go
  3. 290 0
      docs/docs.go
  4. 290 0
      docs/swagger.json
  5. 203 0
      docs/swagger.yaml
  6. 63 0
      models/qhj.go
  7. 104 0
      models/qhjPCWeb.go
  8. 2 0
      routers/router.go

+ 16 - 0
controllers/qhj/qryQhj.go

@@ -428,3 +428,19 @@ func QueryParentAreaList(c *gin.Context) {
 	m := models.QhjParentAreaList{USERID: mtpcache.GetAreaUserId(req.USERID, 0)}
 	a.DoGetDataI(&m)
 }
+
+// QueryAreaFinanceConfig
+// @Summary 查询企业配置表
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int false "机构用户ID 其他做市关系,都设置为 1"
+// @Success 200 {array} models.QhjAreaFinanceConfig
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryAreaFinanceConfig [get]
+// @Tags 大连千海金
+func QueryAreaFinanceConfig(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.QhjAreaFinanceConfig{}
+	a.DoBindReq(&m)
+	a.DoGetDataI(&m)
+}

+ 19 - 0
controllers/qhjPCWeb/qryQhjPCWeb.go

@@ -307,3 +307,22 @@ func QueryPickGoods(c *gin.Context) {
 	m := models.QhjPickGoods{FilterStatus: req.STATUS}
 	a.DoGetDataI(&m)
 }
+
+// QueryBrokerApply
+// @Summary 查询经纪人申请
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int false "所属机构ID"
+// @Param filterstatus query string false "状态 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回"
+// @Param filtername query string false "名称(模糊匹配)"
+// @Param includesub query int false "是否包含子级 1-包含"
+// @Success 200 {array} models.QhjMgrBrokerApply
+// @Failure 500 {object} app.Response
+// @Router /QhjMgr/QueryBrokerApply [get]
+// @Tags 大连千海金(PCWeb)
+func QueryBrokerApply(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.QhjMgrBrokerApply{}
+	a.DoBindReq(&m)
+	a.DoGetDataI(&m)
+}

+ 290 - 0
docs/docs.go

@@ -7114,6 +7114,47 @@ var doc = `{
                 }
             }
         },
+        "/Qhj/QueryAreaFinanceConfig": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询企业配置表",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "机构用户ID 其他做市关系,都设置为 1",
+                        "name": "userid",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjAreaFinanceConfig"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryBankAccountSign": {
             "get": {
                 "security": [
@@ -8033,6 +8074,65 @@ var doc = `{
                 }
             }
         },
+        "/QhjMgr/QueryBrokerApply": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询经纪人申请",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "所属机构ID",
+                        "name": "userid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "状态 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                        "name": "filterstatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "名称(模糊匹配)",
+                        "name": "filtername",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "是否包含子级 1-包含",
+                        "name": "includesub",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjMgrBrokerApply"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/QhjMgr/QueryContract": {
             "get": {
                 "security": [
@@ -23100,6 +23200,83 @@ var doc = `{
                 }
             }
         },
+        "models.QhjAreaFinanceConfig": {
+            "type": "object",
+            "properties": {
+                "additionalratio": {
+                    "description": "追加款比例",
+                    "type": "number"
+                },
+                "advanceratio": {
+                    "description": "预付款比例",
+                    "type": "number"
+                },
+                "alarmratio": {
+                    "description": "告警比例",
+                    "type": "number"
+                },
+                "consumptiondirectreward": {
+                    "description": "消费直推奖励值",
+                    "type": "number"
+                },
+                "consumptionenabled": {
+                    "description": "是否启用消费奖励 - 0:不启用 1:启用",
+                    "type": "integer"
+                },
+                "consumptionindirectreward": {
+                    "description": "消费间推奖励值",
+                    "type": "number"
+                },
+                "consumptionmodel": {
+                    "description": "消费奖励方式 - 1:比率 2:固定",
+                    "type": "integer"
+                },
+                "customerservicenum": {
+                    "description": "客服电话",
+                    "type": "string"
+                },
+                "dayinterestrate": {
+                    "description": "日利率",
+                    "type": "number"
+                },
+                "disableconsumptiontips": {
+                    "description": "关闭消费奖励提示",
+                    "type": "string"
+                },
+                "modifierid": {
+                    "description": "修改人ID",
+                    "type": "integer"
+                },
+                "modifysrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "promotionvalue": {
+                    "description": "推广奖励值(固定)",
+                    "type": "number"
+                },
+                "scoreconfigvalue1": {
+                    "description": "提货积分配置1",
+                    "type": "integer"
+                },
+                "scoreconfigvalue2": {
+                    "description": "提货积分配置2",
+                    "type": "integer"
+                },
+                "userid": {
+                    "description": "机构用户ID其他做市关系,都设置为 1",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjBankAccountSign": {
             "type": "object",
             "properties": {
@@ -23988,6 +24165,119 @@ var doc = `{
                 }
             }
         },
+        "models.QhjMgrBrokerApply": {
+            "type": "object",
+            "properties": {
+                "applicantid": {
+                    "description": "申请人",
+                    "type": "integer"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "applystatus": {
+                    "description": "申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                    "type": "integer"
+                },
+                "applytime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "auditorid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "brokerapplyid": {
+                    "description": "申请ID(SEQ_BROKERAPPLY)",
+                    "type": "integer"
+                },
+                "cardbackphotourl": {
+                    "description": "证件背面图片地址",
+                    "type": "string"
+                },
+                "cardfrontphotourl": {
+                    "description": "证件正面图片地址",
+                    "type": "string"
+                },
+                "cardnum": {
+                    "description": "证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证",
+                    "type": "string"
+                },
+                "customername": {
+                    "description": "姓名",
+                    "type": "string"
+                },
+                "filterstatus": {
+                    "description": "筛选条件",
+                    "type": "string"
+                },
+                "logincode": {
+                    "description": "登录代码",
+                    "type": "string"
+                },
+                "mobile": {
+                    "description": "手机号码",
+                    "type": "string"
+                },
+                "parentuserid": {
+                    "description": "所属机构id",
+                    "type": "integer"
+                },
+                "parentusername": {
+                    "description": "所属机构名称",
+                    "type": "string"
+                },
+                "refereeuserid": {
+                    "description": "推荐人id(经纪人)",
+                    "type": "integer"
+                },
+                "refernum": {
+                    "description": "推荐码",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "subarealevelpath": {
+                    "description": "层级路径",
+                    "type": "string"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "申请人用户ID",
+                    "type": "integer"
+                },
+                "userinfotype": {
+                    "description": "用户类型  1-个人 2-企业",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjMgrContract": {
             "type": "object",
             "properties": {

+ 290 - 0
docs/swagger.json

@@ -7098,6 +7098,47 @@
                 }
             }
         },
+        "/Qhj/QueryAreaFinanceConfig": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询企业配置表",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "机构用户ID 其他做市关系,都设置为 1",
+                        "name": "userid",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjAreaFinanceConfig"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryBankAccountSign": {
             "get": {
                 "security": [
@@ -8017,6 +8058,65 @@
                 }
             }
         },
+        "/QhjMgr/QueryBrokerApply": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询经纪人申请",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "所属机构ID",
+                        "name": "userid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "状态 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                        "name": "filterstatus",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "名称(模糊匹配)",
+                        "name": "filtername",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "是否包含子级 1-包含",
+                        "name": "includesub",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjMgrBrokerApply"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/QhjMgr/QueryContract": {
             "get": {
                 "security": [
@@ -23084,6 +23184,83 @@
                 }
             }
         },
+        "models.QhjAreaFinanceConfig": {
+            "type": "object",
+            "properties": {
+                "additionalratio": {
+                    "description": "追加款比例",
+                    "type": "number"
+                },
+                "advanceratio": {
+                    "description": "预付款比例",
+                    "type": "number"
+                },
+                "alarmratio": {
+                    "description": "告警比例",
+                    "type": "number"
+                },
+                "consumptiondirectreward": {
+                    "description": "消费直推奖励值",
+                    "type": "number"
+                },
+                "consumptionenabled": {
+                    "description": "是否启用消费奖励 - 0:不启用 1:启用",
+                    "type": "integer"
+                },
+                "consumptionindirectreward": {
+                    "description": "消费间推奖励值",
+                    "type": "number"
+                },
+                "consumptionmodel": {
+                    "description": "消费奖励方式 - 1:比率 2:固定",
+                    "type": "integer"
+                },
+                "customerservicenum": {
+                    "description": "客服电话",
+                    "type": "string"
+                },
+                "dayinterestrate": {
+                    "description": "日利率",
+                    "type": "number"
+                },
+                "disableconsumptiontips": {
+                    "description": "关闭消费奖励提示",
+                    "type": "string"
+                },
+                "modifierid": {
+                    "description": "修改人ID",
+                    "type": "integer"
+                },
+                "modifysrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "promotionvalue": {
+                    "description": "推广奖励值(固定)",
+                    "type": "number"
+                },
+                "scoreconfigvalue1": {
+                    "description": "提货积分配置1",
+                    "type": "integer"
+                },
+                "scoreconfigvalue2": {
+                    "description": "提货积分配置2",
+                    "type": "integer"
+                },
+                "userid": {
+                    "description": "机构用户ID其他做市关系,都设置为 1",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjBankAccountSign": {
             "type": "object",
             "properties": {
@@ -23972,6 +24149,119 @@
                 }
             }
         },
+        "models.QhjMgrBrokerApply": {
+            "type": "object",
+            "properties": {
+                "applicantid": {
+                    "description": "申请人",
+                    "type": "integer"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "applystatus": {
+                    "description": "申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                    "type": "integer"
+                },
+                "applytime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "auditorid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "brokerapplyid": {
+                    "description": "申请ID(SEQ_BROKERAPPLY)",
+                    "type": "integer"
+                },
+                "cardbackphotourl": {
+                    "description": "证件背面图片地址",
+                    "type": "string"
+                },
+                "cardfrontphotourl": {
+                    "description": "证件正面图片地址",
+                    "type": "string"
+                },
+                "cardnum": {
+                    "description": "证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证",
+                    "type": "string"
+                },
+                "customername": {
+                    "description": "姓名",
+                    "type": "string"
+                },
+                "filterstatus": {
+                    "description": "筛选条件",
+                    "type": "string"
+                },
+                "logincode": {
+                    "description": "登录代码",
+                    "type": "string"
+                },
+                "mobile": {
+                    "description": "手机号码",
+                    "type": "string"
+                },
+                "parentuserid": {
+                    "description": "所属机构id",
+                    "type": "integer"
+                },
+                "parentusername": {
+                    "description": "所属机构名称",
+                    "type": "string"
+                },
+                "refereeuserid": {
+                    "description": "推荐人id(经纪人)",
+                    "type": "integer"
+                },
+                "refernum": {
+                    "description": "推荐码",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "subarealevelpath": {
+                    "description": "层级路径",
+                    "type": "string"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "申请人用户ID",
+                    "type": "integer"
+                },
+                "userinfotype": {
+                    "description": "用户类型  1-个人 2-企业",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjMgrContract": {
             "type": "object",
             "properties": {

+ 203 - 0
docs/swagger.yaml

@@ -9492,6 +9492,63 @@ definitions:
         description: 更新时间
         type: string
     type: object
+  models.QhjAreaFinanceConfig:
+    properties:
+      additionalratio:
+        description: 追加款比例
+        type: number
+      advanceratio:
+        description: 预付款比例
+        type: number
+      alarmratio:
+        description: 告警比例
+        type: number
+      consumptiondirectreward:
+        description: 消费直推奖励值
+        type: number
+      consumptionenabled:
+        description: 是否启用消费奖励 - 0:不启用 1:启用
+        type: integer
+      consumptionindirectreward:
+        description: 消费间推奖励值
+        type: number
+      consumptionmodel:
+        description: 消费奖励方式 - 1:比率 2:固定
+        type: integer
+      customerservicenum:
+        description: 客服电话
+        type: string
+      dayinterestrate:
+        description: 日利率
+        type: number
+      disableconsumptiontips:
+        description: 关闭消费奖励提示
+        type: string
+      modifierid:
+        description: 修改人ID
+        type: integer
+      modifysrc:
+        description: 审核来源 - 1:管理端 2:终端
+        type: integer
+      modifytime:
+        description: 修改时间
+        type: string
+      promotionvalue:
+        description: 推广奖励值(固定)
+        type: number
+      scoreconfigvalue1:
+        description: 提货积分配置1
+        type: integer
+      scoreconfigvalue2:
+        description: 提货积分配置2
+        type: integer
+      userid:
+        description: 机构用户ID其他做市关系,都设置为 1
+        type: integer
+      username:
+        description: 用户名称
+        type: string
+    type: object
   models.QhjBankAccountSign:
     properties:
       accountcode:
@@ -10157,6 +10214,90 @@ definitions:
         description: 账户类型 1-个人 2-企业
         type: integer
     type: object
+  models.QhjMgrBrokerApply:
+    properties:
+      applicantid:
+        description: 申请人
+        type: integer
+      applysrc:
+        description: 申请来源 - 1:管理端 2:终端
+        type: integer
+      applystatus:
+        description: 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+        type: integer
+      applytime:
+        description: 申请时间
+        type: string
+      auditorid:
+        description: 审核人
+        type: integer
+      auditremark:
+        description: 审核备注
+        type: string
+      auditsrc:
+        description: 审核来源 - 1:管理端 2:终端
+        type: integer
+      audittime:
+        description: 审核时间
+        type: string
+      audittradedate:
+        description: 审核交易日(yyyyMMdd)
+        type: string
+      brokerapplyid:
+        description: 申请ID(SEQ_BROKERAPPLY)
+        type: integer
+      cardbackphotourl:
+        description: 证件背面图片地址
+        type: string
+      cardfrontphotourl:
+        description: 证件正面图片地址
+        type: string
+      cardnum:
+        description: 证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证
+        type: string
+      customername:
+        description: 姓名
+        type: string
+      filterstatus:
+        description: 筛选条件
+        type: string
+      logincode:
+        description: 登录代码
+        type: string
+      mobile:
+        description: 手机号码
+        type: string
+      parentuserid:
+        description: 所属机构id
+        type: integer
+      parentusername:
+        description: 所属机构名称
+        type: string
+      refereeuserid:
+        description: 推荐人id(经纪人)
+        type: integer
+      refernum:
+        description: 推荐码
+        type: string
+      remark:
+        description: 备注
+        type: string
+      subarealevelpath:
+        description: 层级路径
+        type: string
+      tradedate:
+        description: 交易日(yyyyMMdd)
+        type: string
+      userid:
+        description: 申请人用户ID
+        type: integer
+      userinfotype:
+        description: 用户类型  1-个人 2-企业
+        type: integer
+      username:
+        description: 用户名称
+        type: string
+    type: object
   models.QhjMgrContract:
     properties:
       contractconfirmtime:
@@ -19021,6 +19162,31 @@ paths:
       summary: 查询充值提现
       tags:
       - 大连千海金
+  /Qhj/QueryAreaFinanceConfig:
+    get:
+      parameters:
+      - description: 机构用户ID 其他做市关系,都设置为 1
+        in: query
+        name: userid
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjAreaFinanceConfig'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询企业配置表
+      tags:
+      - 大连千海金
   /Qhj/QueryBankAccountSign:
     get:
       parameters:
@@ -19595,6 +19761,43 @@ paths:
       summary: 查询充值提现
       tags:
       - 大连千海金(PCWeb)
+  /QhjMgr/QueryBrokerApply:
+    get:
+      parameters:
+      - description: 所属机构ID
+        in: query
+        name: userid
+        type: integer
+      - description: 状态 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+        in: query
+        name: filterstatus
+        type: string
+      - description: 名称(模糊匹配)
+        in: query
+        name: filtername
+        type: string
+      - description: 是否包含子级 1-包含
+        in: query
+        name: includesub
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjMgrBrokerApply'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询经纪人申请
+      tags:
+      - 大连千海金(PCWeb)
   /QhjMgr/QueryContract:
     get:
       parameters:

+ 63 - 0
models/qhj.go

@@ -1812,3 +1812,66 @@ func (r *QhjParentAreaList) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// QhjAreaFinanceConfig 企业配置表
+type QhjAreaFinanceConfig struct {
+	ADDITIONALRATIO           float64 `json:"additionalratio"  xorm:"ADDITIONALRATIO" form:"additionalratio"`                               // 追加款比例
+	ADVANCERATIO              float64 `json:"advanceratio"  xorm:"ADVANCERATIO" form:"advanceratio"`                                        // 预付款比例
+	ALARMRATIO                float64 `json:"alarmratio"  xorm:"ALARMRATIO" form:"alarmratio"`                                              // 告警比例
+	CONSUMPTIONDIRECTREWARD   float64 `json:"consumptiondirectreward"  xorm:"CONSUMPTIONDIRECTREWARD" form:"consumptiondirectreward"`       // 消费直推奖励值
+	CONSUMPTIONINDIRECTREWARD float64 `json:"consumptionindirectreward"  xorm:"CONSUMPTIONINDIRECTREWARD" form:"consumptionindirectreward"` // 消费间推奖励值
+	DAYINTERESTRATE           float64 `json:"dayinterestrate"  xorm:"DAYINTERESTRATE" form:"dayinterestrate"`                               // 日利率
+	PROMOTIONVALUE            float64 `json:"promotionvalue"  xorm:"PROMOTIONVALUE" form:"promotionvalue"`                                  // 推广奖励值(固定)
+	CONSUMPTIONENABLED        int32   `json:"consumptionenabled"  xorm:"CONSUMPTIONENABLED" form:"consumptionenabled"`                      // 是否启用消费奖励 - 0:不启用 1:启用
+	CONSUMPTIONMODEL          int32   `json:"consumptionmodel"  xorm:"CONSUMPTIONMODEL" form:"consumptionmodel"`                            // 消费奖励方式 - 1:比率 2:固定
+	MODIFYSRC                 int32   `json:"modifysrc"  xorm:"MODIFYSRC" form:"modifysrc"`                                                 // 审核来源 - 1:管理端 2:终端
+	SCORECONFIGVALUE1         int32   `json:"scoreconfigvalue1"  xorm:"SCORECONFIGVALUE1" form:"scoreconfigvalue1"`                         // 提货积分配置1
+	SCORECONFIGVALUE2         int32   `json:"scoreconfigvalue2"  xorm:"SCORECONFIGVALUE2" form:"scoreconfigvalue2"`                         // 提货积分配置2
+	MODIFIERID                int64   `json:"modifierid"  xorm:"MODIFIERID" form:"modifierid"`                                              // 修改人ID
+	USERID                    int64   `json:"userid"  xorm:"USERID" form:"userid"`                                                          // 机构用户ID其他做市关系,都设置为 1
+	CUSTOMERSERVICENUM        string  `json:"customerservicenum"  xorm:"CUSTOMERSERVICENUM" form:"customerservicenum"`                      // 客服电话
+	DISABLECONSUMPTIONTIPS    string  `json:"disableconsumptiontips"  xorm:"DISABLECONSUMPTIONTIPS" form:"disableconsumptiontips"`          // 关闭消费奖励提示
+	MODIFYTIME                string  `json:"modifytime"  xorm:"MODIFYTIME" form:"modifytime"`                                              // 修改时间
+	USERNAME                  string  `json:"username"  xorm:"'USERNAME'"`                                                                  // 用户名称
+
+}
+
+func (r *QhjAreaFinanceConfig) calc() {
+
+}
+
+func (r *QhjAreaFinanceConfig) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.CUSTOMERSERVICENUM," +
+		"       t.SCORECONFIGVALUE1," +
+		"       t.SCORECONFIGVALUE2," +
+		"       t.CONSUMPTIONENABLED," +
+		"       t.PROMOTIONVALUE," +
+		"       t.CONSUMPTIONMODEL," +
+		"       t.CONSUMPTIONDIRECTREWARD," +
+		"       t.CONSUMPTIONINDIRECTREWARD," +
+		"       t.DISABLECONSUMPTIONTIPS," +
+		"       t.USERID," +
+		"       t.ADVANCERATIO," +
+		"       t.ALARMRATIO," +
+		"       t.ADDITIONALRATIO," +
+		"       t.DAYINTERESTRATE," +
+		"       to_char(t.MODIFYTIME, 'yyyy-mm-dd hh24:mi:ss') MODIFYTIME," +
+		"       t.MODIFIERID," +
+		"       t.MODIFYSRC," +
+		"       u.accountname username" +
+		"  FROM AREAFINANCECONFIG t" +
+		"  LEFT JOIN USERACCOUNT u on t.userid=u.userid" +
+		" WHERE 1 = 1"
+	sqlId.AndEx("t.userid", r.USERID, r.USERID > 0)
+	return sqlId.String()
+}
+
+// GetDataEx 获取企业配置表
+func (r *QhjAreaFinanceConfig) GetDataEx() (interface{}, error) {
+	sData := make([]QhjAreaFinanceConfig, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 104 - 0
models/qhjPCWeb.go

@@ -1224,3 +1224,107 @@ func (r *QhjMgrPickGoods) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// 经纪人扩展信息
+type BrokerExInfo struct {
+	USERNAME         string `json:"username"  xorm:"'USERNAME'"`                 // 用户名称
+	PARENTUSERID     int64  `json:"parentuserid"  xorm:"'PARENTUSERID'"`         // 所属机构id
+	USERINFOTYPE     int32  `json:"userinfotype"  xorm:"'USERINFOTYPE'"`         // 用户类型  1-个人 2-企业
+	MOBILE           string `json:"mobile"  xorm:"'MOBILE'"`                     // 手机号码
+	PARENTUSERNAME   string `json:"parentusername"  xorm:"'PARENTUSERNAME'"`     // 所属机构名称
+	LOGINCODE        string `json:"logincode"  xorm:"'LOGINCODE'"`               // 登录代码
+	SUBAREALEVELPATH string `json:"subarealevelpath"  xorm:"'SUBAREALEVELPATH'"` // 层级路径
+	REFEREEUSERID    int64  `json:"refereeuserid"  xorm:"'REFEREEUSERID'"`       // 推荐人id(经纪人)
+	REFERNUM         string `json:"refernum"  xorm:"'REFERNUM'"`                 // 推荐码
+}
+
+// QhjMgrBrokerApply 经济人申请表
+type QhjMgrBrokerApply struct {
+	APPLYSRC          int32  `json:"applysrc"  xorm:"APPLYSRC" form:"applysrc"`                            // 申请来源 - 1:管理端 2:终端
+	APPLYSTATUS       int32  `json:"applystatus"  xorm:"APPLYSTATUS" form:"applystatus"`                   // 申请状态 - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+	AUDITSRC          int32  `json:"auditsrc"  xorm:"AUDITSRC" form:"auditsrc"`                            // 审核来源 - 1:管理端 2:终端
+	APPLICANTID       int64  `json:"applicantid"  xorm:"APPLICANTID" form:"applicantid"`                   // 申请人
+	AUDITORID         int64  `json:"auditorid"  xorm:"AUDITORID" form:"auditorid"`                         // 审核人
+	BROKERAPPLYID     int64  `json:"brokerapplyid"  xorm:"BROKERAPPLYID" form:"brokerapplyid"`             // 申请ID(SEQ_BROKERAPPLY)
+	USERID            int64  `json:"userid"  xorm:"USERID" form:"userid"`                                  // 申请人用户ID
+	APPLYTIME         string `json:"applytime"  xorm:"APPLYTIME" form:"applytime"`                         // 申请时间
+	AUDITREMARK       string `json:"auditremark"  xorm:"AUDITREMARK" form:"auditremark"`                   // 审核备注
+	AUDITTIME         string `json:"audittime"  xorm:"AUDITTIME" form:"audittime"`                         // 审核时间
+	AUDITTRADEDATE    string `json:"audittradedate"  xorm:"AUDITTRADEDATE" form:"audittradedate"`          // 审核交易日(yyyyMMdd)
+	CARDBACKPHOTOURL  string `json:"cardbackphotourl"  xorm:"CARDBACKPHOTOURL" form:"cardbackphotourl"`    // 证件背面图片地址
+	CARDFRONTPHOTOURL string `json:"cardfrontphotourl"  xorm:"CARDFRONTPHOTOURL" form:"cardfrontphotourl"` // 证件正面图片地址
+	CARDNUM           string `json:"cardnum"  xorm:"CARDNUM" form:"cardnum"`                               // 证件号码(加密存储) 注:数据库没存证件类型字段,产品说类型固定为身份证
+	CUSTOMERNAME      string `json:"customername"  xorm:"CUSTOMERNAME" form:"customername"`                // 姓名
+	REMARK            string `json:"remark"  xorm:"REMARK" form:"remark"`                                  // 备注
+	TRADEDATE         string `json:"tradedate"  xorm:"TRADEDATE" form:"tradedate"`                         // 交易日(yyyyMMdd)
+	BrokerExInfo      `xorm:"extends"`
+
+	IncludeSub   int32  `json:"-" form:"includesub"`              // 是否包含子级 1-包含
+	FilterName   string `json:"-" form:"filtername"`              // 模糊搜索名称
+	FilterStatus string `json:"filterstatus" form:"filterstatus"` // 筛选条件
+}
+
+func (r *QhjMgrBrokerApply) calc() {
+	r.MOBILE = DecryptField(r.MOBILE)
+	r.CARDNUM = DecryptField(r.CARDNUM)
+	if r.LOGINCODE == "" {
+		r.LOGINCODE = r.MOBILE
+	}
+}
+
+func (r *QhjMgrBrokerApply) buildSql() string {
+	var sqlId utils.SQLVal = "with k as (select t.userid, wm_concat(t.logincode) logincode from loginaccount t group by t.userid)" +
+		"SELECT t.CUSTOMERNAME," +
+		"       t.CARDNUM," +
+		"       t.CARDFRONTPHOTOURL," +
+		"       t.CARDBACKPHOTOURL," +
+		"       t.BROKERAPPLYID," +
+		"       t.USERID," +
+		"       t.TRADEDATE," +
+		"       t.APPLYSRC," +
+		"       t.APPLICANTID," +
+		"       t.REMARK," +
+		"       to_char(t.APPLYTIME, 'yyyy-mm-dd hh24:mi:ss') APPLYTIME," +
+		"       t.APPLYSTATUS," +
+		"       t.AUDITTRADEDATE," +
+		"       t.AUDITORID," +
+		"       t.AUDITSRC," +
+		"       to_char(t.AUDITTIME, 'yyyy-mm-dd hh24:mi:ss') AUDITTIME," +
+		"       t.AUDITREMARK," +
+		"       u.accountname USERNAME," +
+		"       u.parentuserid," +
+		"       u.refereeuserid," +
+		"       u.refernum," +
+		"       ui.userinfotype," +
+		"       ui.mobile," +
+		"       u2.accountname PARENTUSERNAME," +
+		"       k.logincode," +
+		"       u.subarealevelpath" +
+		"  FROM BROKERAPPLY t" +
+		"  INNER JOIN USERACCOUNT u on t.userid=u.userid" +
+		"  INNER JOIN USERINFO ui on t.userid=ui.userid" +
+		"  LEFT JOIN k on t.userid=k.userid" +
+		"  LEFT JOIN USERACCOUNT u2 on u.parentuserid=u2.userid" +
+		" WHERE 1 = 1"
+	if r.IncludeSub == 1 {
+		sqlId.JoinFormat(" and u.subarealevelpath like '%%,%v,%%,%%'", r.USERID)
+	} else {
+		sqlId.And("u.parentuserid", r.USERID)
+	}
+	sqlId.JoinEx(r.FilterStatus != "", fmt.Sprintf(" and t.APPLYSTATUS in(%v)", r.FilterStatus))
+	sqlId.AndEx("ui.USERINFOTYPE", r.USERINFOTYPE, r.USERINFOTYPE > 0)
+	if len(r.FilterName) > 0 {
+		sqlId.JoinFormat(" and (k.logincode like '%%%v%%' or t.CUSTOMERNAME like '%%%v%%')", r.FilterName, r.FilterName)
+	}
+	return sqlId.String()
+}
+
+// GetDataEx 获取经济人申请表
+func (r *QhjMgrBrokerApply) GetDataEx() (interface{}, error) {
+	sData := make([]QhjMgrBrokerApply, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 2 - 0
routers/router.go

@@ -473,6 +473,7 @@ func InitRouter() *gin.Engine {
 		qhjR.GET("QueryPayOrder", qhj.QueryPayOrder)
 		qhjR.GET("QueryGoodsEx", qhj.QueryGoodsEx)
 		qhjR.GET("QueryParentAreaList", qhj.QueryParentAreaList)
+		qhjR.GET("QueryAreaFinanceConfig", qhj.QueryAreaFinanceConfig)
 	}
 
 	// *************************千海金(PCWeb)*****************************
@@ -488,6 +489,7 @@ func InitRouter() *gin.Engine {
 		qhjPCWebR.GET("QueryTradePayOrder", qhjPCWeb.QueryTradePayOrder)
 		qhjPCWebR.GET("QueryContract", qhjPCWeb.QueryContract)
 		qhjPCWebR.GET("QueryPickGoods", qhjPCWeb.QueryPickGoods)
+		qhjPCWebR.GET("QueryBrokerApply", qhjPCWeb.QueryBrokerApply)
 	}
 
 	// **********************千海金(协议和签约)**************************