Bladeren bron

【大连千海金】增加接口
1.查询收货地址信息接口
2.查询提货商品接口
3.查询提货单接口
4.查询提现账号配置接口

zou.yingbin 4 jaren geleden
bovenliggende
commit
e2dd9521f4
6 gewijzigde bestanden met toevoegingen van 1718 en 0 verwijderingen
  1. 76 0
      controllers/qhj/qryQhj.go
  2. 503 0
      docs/docs.go
  3. 503 0
      docs/swagger.json
  4. 353 0
      docs/swagger.yaml
  5. 279 0
      models/qhj.go
  6. 4 0
      routers/router.go

+ 76 - 0
controllers/qhj/qryQhj.go

@@ -95,3 +95,79 @@ func QueryRSTriggerLog(c *gin.Context) {
 	m := models.QhjRSTriggerLog{USERID: req.USERID, REGULARLYSTRATEGYID: req.REGULARLYSTRATEGYID}
 	a.DoGetDataI(&m)
 }
+
+// QueryUserReceiveInfo
+// @Summary 查询收货地址信息
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Success 200 {array} models.UserReceiveInfo
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryUserReceiveInfo [get]
+// @Tags 大连千海金
+func QueryUserReceiveInfo(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		USERID int64 `form:"userid" binding:"required"` // 用户id
+	}{}
+	a.DoBindReq(&req)
+	m := models.UserReceiveInfo{USERID: req.USERID}
+	a.DoGetDataI(&m)
+}
+
+// QueryUserCollectConfig
+// @Summary 查询提现账户设置
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Success 200 {array} models.UserCollectConfig
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryUserCollectConfig [get]
+// @Tags 大连千海金
+func QueryUserCollectConfig(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		USERID int64 `form:"userid" binding:"required"` // 用户id
+	}{}
+	a.DoBindReq(&req)
+	m := models.UserCollectConfig{USERID: req.USERID}
+	a.DoGetDataI(&m)
+}
+
+// QueryTradeGoodsPickup
+// @Summary 查询提货
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Success 200 {array} models.QhjTradeGoodsPickup
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryTradeGoodsPickup [get]
+// @Tags 大连千海金
+func QueryTradeGoodsPickup(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		USERID int64 `form:"userid" binding:"required"` // 用户id
+	}{}
+	a.DoBindReq(&req)
+	m := models.QhjTradeGoodsPickup{USERID: req.USERID}
+	a.DoGetDataI(&m)
+}
+
+// QueryPickGoods
+// @Summary 查询提货商品
+// @Produce json
+// @Security ApiKeyAuth
+// @Param status query string false "状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销"
+// @Success 200 {array} models.QhjPickGoods
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryPickGoods [get]
+// @Tags 大连千海金
+func QueryPickGoods(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		STATUS string `form:"status"` // 用户id
+	}{}
+	a.DoBindReq(&req)
+	m := models.QhjPickGoods{FilterStatus: req.STATUS}
+	a.DoGetDataI(&m)
+}

+ 503 - 0
docs/docs.go

@@ -6835,6 +6835,47 @@ var doc = `{
                 }
             }
         },
+        "/Qhj/QueryPickGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询提货商品",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销",
+                        "name": "status",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjPickGoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryRSTriggerLog": {
             "get": {
                 "security": [
@@ -6931,6 +6972,132 @@ var doc = `{
                 }
             }
         },
+        "/Qhj/QueryTradeGoodsPickup": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询提货",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjTradeGoodsPickup"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Qhj/QueryUserCollectConfig": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询提现账户设置",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.UserCollectConfig"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Qhj/QueryUserReceiveInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询收货地址信息",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.UserReceiveInfo"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Quote/QueryHistoryDatas": {
             "get": {
                 "security": [
@@ -20049,6 +20216,63 @@ var doc = `{
                 }
             }
         },
+        "models.QhjPickGoods": {
+            "type": "object",
+            "properties": {
+                "imageaddress": {
+                    "description": "图片",
+                    "type": "string"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifiername": {
+                    "description": "修改人名称",
+                    "type": "string"
+                },
+                "modifysrc": {
+                    "description": "修改来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "pickupgoodsagreeunit": {
+                    "description": "合约乘数",
+                    "type": "number"
+                },
+                "pickupgoodsdesc": {
+                    "description": "描述",
+                    "type": "string"
+                },
+                "pickupgoodsid": {
+                    "description": "提货商品ID",
+                    "type": "string"
+                },
+                "pickupgoodsname": {
+                    "description": "提货商品名称",
+                    "type": "string"
+                },
+                "pickupgoodsstatus": {
+                    "description": "状态 - 1:正常 2:停用 3:注销",
+                    "type": "integer"
+                },
+                "pickupgoodsunitid": {
+                    "description": "单位ID",
+                    "type": "integer"
+                },
+                "preparedays": {
+                    "description": "备货期(天)",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjRSTriggerLog": {
             "type": "object",
             "properties": {
@@ -20279,6 +20503,187 @@ var doc = `{
                 }
             }
         },
+        "models.QhjTradeGoodsPickup": {
+            "type": "object",
+            "properties": {
+                "accountid": {
+                    "description": "账户ID",
+                    "type": "integer"
+                },
+                "address": {
+                    "description": "提货人详细地址",
+                    "type": "string"
+                },
+                "amount": {
+                    "description": "提货金额",
+                    "type": "number"
+                },
+                "artradedate": {
+                    "description": "自动收货交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "auditer": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "auditsrc": {
+                    "description": "更新来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间(发货时间)",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "cardnum": {
+                    "description": "提货人证件号码",
+                    "type": "string"
+                },
+                "cardtypeid": {
+                    "description": "提货人证件类型",
+                    "type": "integer"
+                },
+                "checkremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "districtid": {
+                    "description": "地区",
+                    "type": "integer"
+                },
+                "enumdicname": {
+                    "description": "单位名称(提货商品)",
+                    "type": "string"
+                },
+                "expresscompany": {
+                    "description": "物流公司",
+                    "type": "string"
+                },
+                "expressnum": {
+                    "description": "物流单号",
+                    "type": "string"
+                },
+                "goodsagreeunit": {
+                    "description": "交易商品乘数",
+                    "type": "number"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "goodsqty": {
+                    "description": "交易商品手数(69模式按成交量小数位放大取整)",
+                    "type": "number"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "phonenum": {
+                    "description": "提货人联系方式",
+                    "type": "string"
+                },
+                "pickupgoodsagreeunit": {
+                    "description": "提货商品合约乘数",
+                    "type": "number"
+                },
+                "pickupgoodsid": {
+                    "description": "提货商品ID",
+                    "type": "string"
+                },
+                "pickupgoodsname": {
+                    "description": "提货商品名称",
+                    "type": "string"
+                },
+                "pickupgoodsqty": {
+                    "description": "提货商品手数(数量)",
+                    "type": "number"
+                },
+                "pickupgoodsunitid": {
+                    "description": "单位ID(提货商品)",
+                    "type": "integer"
+                },
+                "pickupratio": {
+                    "description": "提货系数",
+                    "type": "number"
+                },
+                "preparedays": {
+                    "description": "备货期(天)-提货单明细表",
+                    "type": "integer"
+                },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "qty": {
+                    "description": "交易商品总手数(交易商品 - 69模式按成交量放大) - 明细表的交易商品手数汇总",
+                    "type": "number"
+                },
+                "recivername": {
+                    "description": "提货人姓名",
+                    "type": "string"
+                },
+                "reqtime": {
+                    "description": "提货申请时间",
+                    "type": "string"
+                },
+                "storeuserid": {
+                    "description": "门店用户ID (千海金)",
+                    "type": "integer"
+                },
+                "storeusername": {
+                    "description": "门店用户名称",
+                    "type": "string"
+                },
+                "takemode": {
+                    "description": "提货方式 - 2:自提 3:配送(邮寄)",
+                    "type": "integer"
+                },
+                "takeorderid": {
+                    "description": "提货单号(905+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "takeorderstatus": {
+                    "description": "提货状态 -  1:备货中 2:待取货(自提) 3:已取货(自提) 4:待收货(邮寄) 5:已收货(邮寄) 6:自动收货(邮寄) 7:已拒绝 8:已撤销",
+                    "type": "integer"
+                },
+                "takeremark": {
+                    "description": "提货备注",
+                    "type": "string"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QueryErrorInfosRsp": {
             "type": "object",
             "required": [
@@ -21060,6 +21465,104 @@ var doc = `{
                 }
             }
         },
+        "models.UserCollectConfig": {
+            "type": "object",
+            "properties": {
+                "accountstatus": {
+                    "description": "账户状态 -  1:正常 2:停用 3:注销",
+                    "type": "integer"
+                },
+                "collectaccountname": {
+                    "description": "收款人账户名称",
+                    "type": "string"
+                },
+                "collectaccountno": {
+                    "description": "收款人账户",
+                    "type": "string"
+                },
+                "collectbankname": {
+                    "description": "收款人开户行",
+                    "type": "string"
+                },
+                "collectbranchbankname": {
+                    "description": "收款人开户支行",
+                    "type": "string"
+                },
+                "collectconfigid": {
+                    "description": "收款账户配置ID(SEQ_USERCOLLECTCONFIG)",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "收款人用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.UserReceiveInfo": {
+            "type": "object",
+            "properties": {
+                "address": {
+                    "description": "提货人详细地址",
+                    "type": "string"
+                },
+                "autoid": {
+                    "description": "AutoID",
+                    "type": "integer"
+                },
+                "cardnum": {
+                    "description": "证件号码(加密存储)",
+                    "type": "string"
+                },
+                "cardtypeid": {
+                    "description": "证件类型",
+                    "type": "integer"
+                },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "districtid": {
+                    "description": "地区",
+                    "type": "integer"
+                },
+                "hasencrypt": {
+                    "description": "数据是否已加密 - 0:未加密 1:已加密",
+                    "type": "integer"
+                },
+                "isdefault": {
+                    "description": "是否默认地址 - 0:否 1:是",
+                    "type": "integer"
+                },
+                "phonenum": {
+                    "description": "提货人联系方式(加密存储)",
+                    "type": "string"
+                },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "receivername": {
+                    "description": "提货人姓名",
+                    "type": "string"
+                },
+                "takeremark": {
+                    "description": "提货备注",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.Useraccount": {
             "type": "object",
             "required": [

+ 503 - 0
docs/swagger.json

@@ -6819,6 +6819,47 @@
                 }
             }
         },
+        "/Qhj/QueryPickGoods": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询提货商品",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销",
+                        "name": "status",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjPickGoods"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryRSTriggerLog": {
             "get": {
                 "security": [
@@ -6915,6 +6956,132 @@
                 }
             }
         },
+        "/Qhj/QueryTradeGoodsPickup": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询提货",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjTradeGoodsPickup"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Qhj/QueryUserCollectConfig": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询提现账户设置",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.UserCollectConfig"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Qhj/QueryUserReceiveInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询收货地址信息",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.UserReceiveInfo"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Quote/QueryHistoryDatas": {
             "get": {
                 "security": [
@@ -20033,6 +20200,63 @@
                 }
             }
         },
+        "models.QhjPickGoods": {
+            "type": "object",
+            "properties": {
+                "imageaddress": {
+                    "description": "图片",
+                    "type": "string"
+                },
+                "modifierid": {
+                    "description": "修改人",
+                    "type": "integer"
+                },
+                "modifiername": {
+                    "description": "修改人名称",
+                    "type": "string"
+                },
+                "modifysrc": {
+                    "description": "修改来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "pickupgoodsagreeunit": {
+                    "description": "合约乘数",
+                    "type": "number"
+                },
+                "pickupgoodsdesc": {
+                    "description": "描述",
+                    "type": "string"
+                },
+                "pickupgoodsid": {
+                    "description": "提货商品ID",
+                    "type": "string"
+                },
+                "pickupgoodsname": {
+                    "description": "提货商品名称",
+                    "type": "string"
+                },
+                "pickupgoodsstatus": {
+                    "description": "状态 - 1:正常 2:停用 3:注销",
+                    "type": "integer"
+                },
+                "pickupgoodsunitid": {
+                    "description": "单位ID",
+                    "type": "integer"
+                },
+                "preparedays": {
+                    "description": "备货期(天)",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjRSTriggerLog": {
             "type": "object",
             "properties": {
@@ -20263,6 +20487,187 @@
                 }
             }
         },
+        "models.QhjTradeGoodsPickup": {
+            "type": "object",
+            "properties": {
+                "accountid": {
+                    "description": "账户ID",
+                    "type": "integer"
+                },
+                "address": {
+                    "description": "提货人详细地址",
+                    "type": "string"
+                },
+                "amount": {
+                    "description": "提货金额",
+                    "type": "number"
+                },
+                "artradedate": {
+                    "description": "自动收货交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "auditer": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "auditsrc": {
+                    "description": "更新来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间(发货时间)",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "cardnum": {
+                    "description": "提货人证件号码",
+                    "type": "string"
+                },
+                "cardtypeid": {
+                    "description": "提货人证件类型",
+                    "type": "integer"
+                },
+                "checkremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "districtid": {
+                    "description": "地区",
+                    "type": "integer"
+                },
+                "enumdicname": {
+                    "description": "单位名称(提货商品)",
+                    "type": "string"
+                },
+                "expresscompany": {
+                    "description": "物流公司",
+                    "type": "string"
+                },
+                "expressnum": {
+                    "description": "物流单号",
+                    "type": "string"
+                },
+                "goodsagreeunit": {
+                    "description": "交易商品乘数",
+                    "type": "number"
+                },
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "goodsqty": {
+                    "description": "交易商品手数(69模式按成交量小数位放大取整)",
+                    "type": "number"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "phonenum": {
+                    "description": "提货人联系方式",
+                    "type": "string"
+                },
+                "pickupgoodsagreeunit": {
+                    "description": "提货商品合约乘数",
+                    "type": "number"
+                },
+                "pickupgoodsid": {
+                    "description": "提货商品ID",
+                    "type": "string"
+                },
+                "pickupgoodsname": {
+                    "description": "提货商品名称",
+                    "type": "string"
+                },
+                "pickupgoodsqty": {
+                    "description": "提货商品手数(数量)",
+                    "type": "number"
+                },
+                "pickupgoodsunitid": {
+                    "description": "单位ID(提货商品)",
+                    "type": "integer"
+                },
+                "pickupratio": {
+                    "description": "提货系数",
+                    "type": "number"
+                },
+                "preparedays": {
+                    "description": "备货期(天)-提货单明细表",
+                    "type": "integer"
+                },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "qty": {
+                    "description": "交易商品总手数(交易商品 - 69模式按成交量放大) - 明细表的交易商品手数汇总",
+                    "type": "number"
+                },
+                "recivername": {
+                    "description": "提货人姓名",
+                    "type": "string"
+                },
+                "reqtime": {
+                    "description": "提货申请时间",
+                    "type": "string"
+                },
+                "storeuserid": {
+                    "description": "门店用户ID (千海金)",
+                    "type": "integer"
+                },
+                "storeusername": {
+                    "description": "门店用户名称",
+                    "type": "string"
+                },
+                "takemode": {
+                    "description": "提货方式 - 2:自提 3:配送(邮寄)",
+                    "type": "integer"
+                },
+                "takeorderid": {
+                    "description": "提货单号(905+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "takeorderstatus": {
+                    "description": "提货状态 -  1:备货中 2:待取货(自提) 3:已取货(自提) 4:待收货(邮寄) 5:已收货(邮寄) 6:自动收货(邮寄) 7:已拒绝 8:已撤销",
+                    "type": "integer"
+                },
+                "takeremark": {
+                    "description": "提货备注",
+                    "type": "string"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QueryErrorInfosRsp": {
             "type": "object",
             "required": [
@@ -21044,6 +21449,104 @@
                 }
             }
         },
+        "models.UserCollectConfig": {
+            "type": "object",
+            "properties": {
+                "accountstatus": {
+                    "description": "账户状态 -  1:正常 2:停用 3:注销",
+                    "type": "integer"
+                },
+                "collectaccountname": {
+                    "description": "收款人账户名称",
+                    "type": "string"
+                },
+                "collectaccountno": {
+                    "description": "收款人账户",
+                    "type": "string"
+                },
+                "collectbankname": {
+                    "description": "收款人开户行",
+                    "type": "string"
+                },
+                "collectbranchbankname": {
+                    "description": "收款人开户支行",
+                    "type": "string"
+                },
+                "collectconfigid": {
+                    "description": "收款账户配置ID(SEQ_USERCOLLECTCONFIG)",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "收款人用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.UserReceiveInfo": {
+            "type": "object",
+            "properties": {
+                "address": {
+                    "description": "提货人详细地址",
+                    "type": "string"
+                },
+                "autoid": {
+                    "description": "AutoID",
+                    "type": "integer"
+                },
+                "cardnum": {
+                    "description": "证件号码(加密存储)",
+                    "type": "string"
+                },
+                "cardtypeid": {
+                    "description": "证件类型",
+                    "type": "integer"
+                },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "districtid": {
+                    "description": "地区",
+                    "type": "integer"
+                },
+                "hasencrypt": {
+                    "description": "数据是否已加密 - 0:未加密 1:已加密",
+                    "type": "integer"
+                },
+                "isdefault": {
+                    "description": "是否默认地址 - 0:否 1:是",
+                    "type": "integer"
+                },
+                "phonenum": {
+                    "description": "提货人联系方式(加密存储)",
+                    "type": "string"
+                },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "receivername": {
+                    "description": "提货人姓名",
+                    "type": "string"
+                },
+                "takeremark": {
+                    "description": "提货备注",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.Useraccount": {
             "type": "object",
             "required": [

+ 353 - 0
docs/swagger.yaml

@@ -8789,6 +8789,48 @@ definitions:
         description: 更新时间
         type: string
     type: object
+  models.QhjPickGoods:
+    properties:
+      imageaddress:
+        description: 图片
+        type: string
+      modifierid:
+        description: 修改人
+        type: integer
+      modifiername:
+        description: 修改人名称
+        type: string
+      modifysrc:
+        description: 修改来源 - 1:管理端 2:终端
+        type: integer
+      pickupgoodsagreeunit:
+        description: 合约乘数
+        type: number
+      pickupgoodsdesc:
+        description: 描述
+        type: string
+      pickupgoodsid:
+        description: 提货商品ID
+        type: string
+      pickupgoodsname:
+        description: 提货商品名称
+        type: string
+      pickupgoodsstatus:
+        description: 状态 - 1:正常 2:停用 3:注销
+        type: integer
+      pickupgoodsunitid:
+        description: 单位ID
+        type: integer
+      preparedays:
+        description: 备货期(天)
+        type: integer
+      remark:
+        description: 备注
+        type: string
+      updatetime:
+        description: 更新时间
+        type: string
+    type: object
   models.QhjRSTriggerLog:
     properties:
       accountid:
@@ -8960,6 +9002,142 @@ definitions:
         description: 用户名称(userid对应的名称)
         type: string
     type: object
+  models.QhjTradeGoodsPickup:
+    properties:
+      accountid:
+        description: 账户ID
+        type: integer
+      address:
+        description: 提货人详细地址
+        type: string
+      amount:
+        description: 提货金额
+        type: number
+      artradedate:
+        description: 自动收货交易日(yyyyMMdd)
+        type: string
+      auditer:
+        description: 审核人
+        type: integer
+      auditsrc:
+        description: 更新来源 - 1:管理端 2:终端
+        type: integer
+      audittime:
+        description: 审核时间(发货时间)
+        type: string
+      audittradedate:
+        description: 审核交易日(yyyyMMdd)
+        type: string
+      cardnum:
+        description: 提货人证件号码
+        type: string
+      cardtypeid:
+        description: 提货人证件类型
+        type: integer
+      checkremark:
+        description: 审核备注
+        type: string
+      cityid:
+        description: 市
+        type: integer
+      countryid:
+        description: 国家
+        type: integer
+      districtid:
+        description: 地区
+        type: integer
+      enumdicname:
+        description: 单位名称(提货商品)
+        type: string
+      expresscompany:
+        description: 物流公司
+        type: string
+      expressnum:
+        description: 物流单号
+        type: string
+      goodsagreeunit:
+        description: 交易商品乘数
+        type: number
+      goodsid:
+        description: 商品ID
+        type: integer
+      goodsqty:
+        description: 交易商品手数(69模式按成交量小数位放大取整)
+        type: number
+      handlestatus:
+        description: 处理状态
+        type: integer
+      marketid:
+        description: 市场ID
+        type: integer
+      phonenum:
+        description: 提货人联系方式
+        type: string
+      pickupgoodsagreeunit:
+        description: 提货商品合约乘数
+        type: number
+      pickupgoodsid:
+        description: 提货商品ID
+        type: string
+      pickupgoodsname:
+        description: 提货商品名称
+        type: string
+      pickupgoodsqty:
+        description: 提货商品手数(数量)
+        type: number
+      pickupgoodsunitid:
+        description: 单位ID(提货商品)
+        type: integer
+      pickupratio:
+        description: 提货系数
+        type: number
+      preparedays:
+        description: 备货期(天)-提货单明细表
+        type: integer
+      provinceid:
+        description: 省
+        type: integer
+      qty:
+        description: 交易商品总手数(交易商品 - 69模式按成交量放大) - 明细表的交易商品手数汇总
+        type: number
+      recivername:
+        description: 提货人姓名
+        type: string
+      reqtime:
+        description: 提货申请时间
+        type: string
+      storeuserid:
+        description: 门店用户ID (千海金)
+        type: integer
+      storeusername:
+        description: 门店用户名称
+        type: string
+      takemode:
+        description: 提货方式 - 2:自提 3:配送(邮寄)
+        type: integer
+      takeorderid:
+        description: 提货单号(905+Unix秒时间戳(10位)+xxxxxx)
+        type: integer
+      takeorderstatus:
+        description: 提货状态 -  1:备货中 2:待取货(自提) 3:已取货(自提) 4:待收货(邮寄) 5:已收货(邮寄) 6:自动收货(邮寄)
+          7:已拒绝 8:已撤销
+        type: integer
+      takeremark:
+        description: 提货备注
+        type: string
+      tradedate:
+        description: 交易日(yyyyMMdd)
+        type: string
+      updatetime:
+        description: 更新时间
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      username:
+        description: 用户名称
+        type: string
+    type: object
   models.QueryErrorInfosRsp:
     properties:
       description:
@@ -9540,6 +9718,78 @@ definitions:
     required:
     - autoid
     type: object
+  models.UserCollectConfig:
+    properties:
+      accountstatus:
+        description: 账户状态 -  1:正常 2:停用 3:注销
+        type: integer
+      collectaccountname:
+        description: 收款人账户名称
+        type: string
+      collectaccountno:
+        description: 收款人账户
+        type: string
+      collectbankname:
+        description: 收款人开户行
+        type: string
+      collectbranchbankname:
+        description: 收款人开户支行
+        type: string
+      collectconfigid:
+        description: 收款账户配置ID(SEQ_USERCOLLECTCONFIG)
+        type: string
+      remark:
+        description: 备注
+        type: string
+      userid:
+        description: 收款人用户ID
+        type: integer
+    type: object
+  models.UserReceiveInfo:
+    properties:
+      address:
+        description: 提货人详细地址
+        type: string
+      autoid:
+        description: AutoID
+        type: integer
+      cardnum:
+        description: 证件号码(加密存储)
+        type: string
+      cardtypeid:
+        description: 证件类型
+        type: integer
+      cityid:
+        description: 市
+        type: integer
+      countryid:
+        description: 国家
+        type: integer
+      districtid:
+        description: 地区
+        type: integer
+      hasencrypt:
+        description: 数据是否已加密 - 0:未加密 1:已加密
+        type: integer
+      isdefault:
+        description: 是否默认地址 - 0:否 1:是
+        type: integer
+      phonenum:
+        description: 提货人联系方式(加密存储)
+        type: string
+      provinceid:
+        description: 省
+        type: integer
+      receivername:
+        description: 提货人姓名
+        type: string
+      takeremark:
+        description: 提货备注
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+    type: object
   models.Useraccount:
     properties:
       accountname:
@@ -16135,6 +16385,31 @@ paths:
       summary: 查询融资明细流水(融资明细详情页中的流水)
       tags:
       - 大连千海金
+  /Qhj/QueryPickGoods:
+    get:
+      parameters:
+      - description: 状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销
+        in: query
+        name: status
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjPickGoods'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询提货商品
+      tags:
+      - 大连千海金
   /Qhj/QueryRSTriggerLog:
     get:
       parameters:
@@ -16195,6 +16470,84 @@ paths:
       summary: 查询定投设置(我的定投/历史定投[状态=已终止])
       tags:
       - 大连千海金
+  /Qhj/QueryTradeGoodsPickup:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjTradeGoodsPickup'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询提货
+      tags:
+      - 大连千海金
+  /Qhj/QueryUserCollectConfig:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.UserCollectConfig'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询提现账户设置
+      tags:
+      - 大连千海金
+  /Qhj/QueryUserReceiveInfo:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.UserReceiveInfo'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询收货地址信息
+      tags:
+      - 大连千海金
   /Quote/QueryHistoryDatas:
     get:
       parameters:

+ 279 - 0
models/qhj.go

@@ -291,3 +291,282 @@ func (r *QhjRSTriggerLog) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// UserReceiveInfo 用户收货信息
+type UserReceiveInfo struct {
+	AUTOID       int32  `json:"autoid"  xorm:"AUTOID"`             // AutoID
+	USERID       int64  `json:"userid"  xorm:"USERID"`             // 用户ID
+	RECEIVERNAME string `json:"receivername"  xorm:"RECEIVERNAME"` // 提货人姓名
+	CARDTYPEID   int32  `json:"cardtypeid"  xorm:"CARDTYPEID"`     // 证件类型
+	CARDNUM      string `json:"cardnum"  xorm:"CARDNUM"`           // 证件号码(加密存储)
+	PHONENUM     string `json:"phonenum"  xorm:"PHONENUM"`         // 提货人联系方式(加密存储)
+	ADDRESS      string `json:"address"  xorm:"ADDRESS"`           // 提货人详细地址
+	TAKEREMARK   string `json:"takeremark"  xorm:"TAKEREMARK"`     // 提货备注
+	COUNTRYID    int32  `json:"countryid"  xorm:"COUNTRYID"`       // 国家
+	PROVINCEID   int32  `json:"provinceid"  xorm:"PROVINCEID"`     // 省
+	CITYID       int32  `json:"cityid"  xorm:"CITYID"`             // 市
+	DISTRICTID   int32  `json:"districtid"  xorm:"DISTRICTID"`     // 地区
+	ISDEFAULT    int32  `json:"isdefault"  xorm:"ISDEFAULT"`       // 是否默认地址 - 0:否 1:是
+	HASENCRYPT   int32  `json:"hasencrypt"  xorm:"HASENCRYPT"`     // 数据是否已加密 - 0:未加密 1:已加密
+}
+
+func (r *UserReceiveInfo) calc() {
+	// 加密过的长度 > 16, 否则是未加密的
+	if len(r.CARDNUM) > 16 {
+		r.CARDNUM = DecryptField(r.CARDNUM)
+	}
+	if len(r.PHONENUM) > 16 {
+		r.PHONENUM = DecryptField(r.PHONENUM)
+	}
+}
+
+func (r *UserReceiveInfo) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.AUTOID," +
+		"       t.USERID," +
+		"       t.RECEIVERNAME," +
+		"       t.CARDTYPEID," +
+		"       t.CARDNUM," +
+		"       t.PHONENUM," +
+		"       t.ADDRESS," +
+		"       t.TAKEREMARK," +
+		"       t.COUNTRYID," +
+		"       t.PROVINCEID," +
+		"       t.CITYID," +
+		"       t.DISTRICTID," +
+		"       t.ISDEFAULT," +
+		"       t.HASENCRYPT" +
+		"  FROM USERRECEIVEINFO t" +
+		" WHERE 1 = 1"
+	sqlId.And("t.USERID", r.USERID)
+	return sqlId.String()
+}
+
+// GetDataEx 获取用户收货信息
+func (r *UserReceiveInfo) GetDataEx() (interface{}, error) {
+	sData := make([]UserReceiveInfo, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// UserCollectConfig 提现账户设置
+type UserCollectConfig struct {
+	COLLECTCONFIGID       string `json:"collectconfigid"  xorm:"COLLECTCONFIGID"`             // 收款账户配置ID(SEQ_USERCOLLECTCONFIG)
+	USERID                int64  `json:"userid"  xorm:"USERID"`                               // 收款人用户ID
+	COLLECTACCOUNTNO      string `json:"collectaccountno"  xorm:"COLLECTACCOUNTNO"`           // 收款人账户
+	COLLECTACCOUNTNAME    string `json:"collectaccountname"  xorm:"COLLECTACCOUNTNAME"`       // 收款人账户名称
+	COLLECTBANKNAME       string `json:"collectbankname"  xorm:"COLLECTBANKNAME"`             // 收款人开户行
+	COLLECTBRANCHBANKNAME string `json:"collectbranchbankname"  xorm:"COLLECTBRANCHBANKNAME"` // 收款人开户支行
+	REMARK                string `json:"remark"  xorm:"REMARK"`                               // 备注
+	ACCOUNTSTATUS         int32  `json:"accountstatus"  xorm:"ACCOUNTSTATUS"`                 // 账户状态 -  1:正常 2:停用 3:注销
+}
+
+func (r *UserCollectConfig) calc() {
+	// 加密后的长度是32的倍数
+	if len(r.COLLECTACCOUNTNO)%32 == 0 {
+		r.COLLECTACCOUNTNO = DecryptField(r.COLLECTACCOUNTNO)
+	}
+}
+
+func (r *UserCollectConfig) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.COLLECTCONFIGID," +
+		"       t.USERID," +
+		"       t.COLLECTACCOUNTNO," +
+		"       t.COLLECTACCOUNTNAME," +
+		"       t.COLLECTBANKNAME," +
+		"       t.COLLECTBRANCHBANKNAME," +
+		"       t.REMARK," +
+		"       t.ACCOUNTSTATUS" +
+		"  FROM USERCOLLECTCONFIG t" +
+		" WHERE 1 = 1"
+	sqlId.And("t.USERID", r.USERID)
+	return sqlId.String()
+}
+
+// GetDataEx 获取提现账户设置
+func (r *UserCollectConfig) GetDataEx() (interface{}, error) {
+	sData := make([]UserCollectConfig, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// QhjTradeGoodsPickup 提货单
+type QhjTradeGoodsPickup struct {
+	AUDITSRC             int32   `json:"auditsrc"  xorm:"AUDITSRC"`                         // 更新来源 - 1:管理端 2:终端
+	STOREUSERID          int64   `json:"storeuserid"  xorm:"STOREUSERID"`                   // 门店用户ID (千海金)
+	ARTRADEDATE          string  `json:"artradedate"  xorm:"ARTRADEDATE"`                   // 自动收货交易日(yyyyMMdd)
+	EXPRESSCOMPANY       string  `json:"expresscompany"  xorm:"EXPRESSCOMPANY"`             // 物流公司
+	UPDATETIME           string  `json:"updatetime"  xorm:"UPDATETIME"`                     // 更新时间
+	AUDITTRADEDATE       string  `json:"audittradedate"  xorm:"AUDITTRADEDATE"`             // 审核交易日(yyyyMMdd)
+	EXPRESSNUM           string  `json:"expressnum"  xorm:"EXPRESSNUM"`                     // 物流单号
+	TAKEORDERID          int64   `json:"takeorderid"  xorm:"TAKEORDERID"`                   // 提货单号(905+Unix秒时间戳(10位)+xxxxxx)
+	ACCOUNTID            int64   `json:"accountid"  xorm:"ACCOUNTID"`                       // 账户ID
+	GOODSID              int64   `json:"goodsid"  xorm:"GOODSID"`                           // 商品ID
+	USERID               int64   `json:"userid"  xorm:"USERID"`                             // 用户ID
+	QTY                  float64 `json:"qty"  xorm:"QTY"`                                   // 交易商品总手数(交易商品 - 69模式按成交量放大) - 明细表的交易商品手数汇总
+	REQTIME              string  `json:"reqtime"  xorm:"REQTIME"`                           // 提货申请时间
+	RECIVERNAME          string  `json:"recivername"  xorm:"RECIVERNAME"`                   // 提货人姓名
+	CARDTYPEID           int32   `json:"cardtypeid"  xorm:"CARDTYPEID"`                     // 提货人证件类型
+	CARDNUM              string  `json:"cardnum"  xorm:"CARDNUM"`                           // 提货人证件号码
+	PHONENUM             string  `json:"phonenum"  xorm:"PHONENUM"`                         // 提货人联系方式
+	TAKEMODE             int32   `json:"takemode"  xorm:"TAKEMODE"`                         // 提货方式 - 2:自提 3:配送(邮寄)
+	ADDRESS              string  `json:"address"  xorm:"ADDRESS"`                           // 提货人详细地址
+	TAKEREMARK           string  `json:"takeremark"  xorm:"TAKEREMARK"`                     // 提货备注
+	TAKEORDERSTATUS      int32   `json:"takeorderstatus"  xorm:"TAKEORDERSTATUS"`           // 提货状态 -  1:备货中 2:待取货(自提) 3:已取货(自提) 4:待收货(邮寄) 5:已收货(邮寄) 6:自动收货(邮寄) 7:已拒绝 8:已撤销
+	AUDITER              int32   `json:"auditer"  xorm:"AUDITER"`                           // 审核人
+	AUDITTIME            string  `json:"audittime"  xorm:"AUDITTIME"`                       // 审核时间(发货时间)
+	CHECKREMARK          string  `json:"checkremark"  xorm:"CHECKREMARK"`                   // 审核备注
+	TRADEDATE            string  `json:"tradedate"  xorm:"TRADEDATE"`                       // 交易日(yyyyMMdd)
+	MARKETID             int32   `json:"marketid"  xorm:"MARKETID"`                         // 市场ID
+	HANDLESTATUS         int32   `json:"handlestatus"  xorm:"HANDLESTATUS"`                 // 处理状态
+	AMOUNT               float64 `json:"amount"  xorm:"AMOUNT"`                             // 提货金额
+	COUNTRYID            int32   `json:"countryid"  xorm:"COUNTRYID"`                       // 国家
+	PROVINCEID           int32   `json:"provinceid"  xorm:"PROVINCEID"`                     // 省
+	CITYID               int32   `json:"cityid"  xorm:"CITYID"`                             // 市
+	DISTRICTID           int32   `json:"districtid"  xorm:"DISTRICTID"`                     // 地区
+	PICKUPGOODSID        string  `json:"pickupgoodsid"  xorm:"PICKUPGOODSID"`               // 提货商品ID
+	GOODSAGREEUNIT       float64 `json:"goodsagreeunit"  xorm:"GOODSAGREEUNIT"`             // 交易商品乘数
+	PICKUPGOODSAGREEUNIT float64 `json:"pickupgoodsagreeunit"  xorm:"PICKUPGOODSAGREEUNIT"` // 提货商品合约乘数
+	PICKUPRATIO          float64 `json:"pickupratio"  xorm:"PICKUPRATIO"`                   // 提货系数
+	PICKUPGOODSQTY       float64 `json:"pickupgoodsqty"  xorm:"PICKUPGOODSQTY"`             // 提货商品手数(数量)
+	GOODSQTY             float64 `json:"goodsqty"  xorm:"GOODSQTY"`                         // 交易商品手数(69模式按成交量小数位放大取整)
+	PREPAREDAYS          int32   `json:"preparedays"  xorm:"PREPAREDAYS"`                   // 备货期(天)-提货单明细表
+	PICKUPGOODSNAME      string  `json:"pickupgoodsname"  xorm:"PICKUPGOODSNAME"`           // 提货商品名称
+	PICKUPGOODSUNITID    int32   `json:"pickupgoodsunitid"  xorm:"PICKUPGOODSUNITID"`       // 单位ID(提货商品)
+
+	ENUMDICNAME   string `json:"enumdicname"`   // 单位名称(提货商品)
+	USERNAME      string `json:"username"`      // 用户名称
+	STOREUSERNAME string `json:"storeusername"` // 门店用户名称
+}
+
+func (r *QhjTradeGoodsPickup) calc() {
+	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.PICKUPGOODSUNITID)
+	r.STOREUSERNAME = mtpcache.GetUserNameByUserId(r.STOREUSERID)
+	r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
+}
+
+func (r *QhjTradeGoodsPickup) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.AUDITSRC," +
+		"       t.STOREUSERID," +
+		"       t.ARTRADEDATE," +
+		"       t.EXPRESSCOMPANY," +
+		"       to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
+		"       t.AUDITTRADEDATE," +
+		"       t.EXPRESSNUM," +
+		"       t.TAKEORDERID," +
+		"       t.ACCOUNTID," +
+		"       t.GOODSID," +
+		"       t.USERID," +
+		"       t.QTY," +
+		"       to_char(t.REQTIME, 'yyyy-mm-dd hh24:mi:ss') REQTIME," +
+		"       t.RECIVERNAME," +
+		"       t.CARDTYPEID," +
+		"       t.CARDNUM," +
+		"       t.PHONENUM," +
+		"       t.TAKEMODE," +
+		"       t.ADDRESS," +
+		"       t.TAKEREMARK," +
+		"       t.TAKEORDERSTATUS," +
+		"       t.AUDITER," +
+		"       to_char(t.AUDITTIME, 'yyyy-mm-dd hh24:mi:ss') AUDITTIME," +
+		"       t.CHECKREMARK," +
+		"       t.TRADEDATE," +
+		"       t.MARKETID," +
+		"       t.HANDLESTATUS," +
+		"       t.AMOUNT," +
+		"       t.COUNTRYID," +
+		"       t.PROVINCEID," +
+		"       t.CITYID," +
+		"       t.DISTRICTID," +
+		"       k.PICKUPGOODSID," +
+		"       k.GOODSAGREEUNIT," +
+		"       k.PICKUPGOODSAGREEUNIT," +
+		"       k.PICKUPRATIO," +
+		"       k.PICKUPGOODSQTY," +
+		"       k.GOODSQTY," +
+		"       k.PREPAREDAYS," +
+		"       g.PICKUPGOODSNAME," +
+		"       g.PICKUPGOODSUNITID" +
+		"  FROM TRADE_GOODSPICKUP t" +
+		"  LEFT JOIN TRADE_GOODSPICKUPDETAIL k on t.takeorderid = k.takeorderid" +
+		"  LEFT JOIN PICKUPGOODS g on k.pickupgoodsid=g.pickupgoodsid" +
+		" WHERE 1 = 1"
+	sqlId.And("t.USERID", r.USERID)
+	return sqlId.String()
+}
+
+// GetDataEx 获取提货单
+func (r *QhjTradeGoodsPickup) GetDataEx() (interface{}, error) {
+	sData := make([]QhjTradeGoodsPickup, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// QhjPickGoods 提货商品
+type QhjPickGoods struct {
+	PICKUPGOODSID        string  `json:"pickupgoodsid"  xorm:"PICKUPGOODSID"`               // 提货商品ID
+	PICKUPGOODSNAME      string  `json:"pickupgoodsname"  xorm:"PICKUPGOODSNAME"`           // 提货商品名称
+	PICKUPGOODSUNITID    int32   `json:"pickupgoodsunitid"  xorm:"PICKUPGOODSUNITID"`       // 单位ID
+	PICKUPGOODSAGREEUNIT float64 `json:"pickupgoodsagreeunit"  xorm:"PICKUPGOODSAGREEUNIT"` // 合约乘数
+	PICKUPGOODSDESC      string  `json:"pickupgoodsdesc"  xorm:"PICKUPGOODSDESC"`           // 描述
+	IMAGEADDRESS         string  `json:"imageaddress"  xorm:"IMAGEADDRESS"`                 // 图片
+	REMARK               string  `json:"remark"  xorm:"REMARK"`                             // 备注
+	MODIFYSRC            int32   `json:"modifysrc"  xorm:"MODIFYSRC"`                       // 修改来源 - 1:管理端 2:终端
+	MODIFIERID           int64   `json:"modifierid"  xorm:"MODIFIERID"`                     // 修改人
+	UPDATETIME           string  `json:"updatetime"  xorm:"UPDATETIME"`                     // 更新时间
+	PREPAREDAYS          int32   `json:"preparedays"  xorm:"PREPAREDAYS"`                   // 备货期(天)
+	PICKUPGOODSSTATUS    int32   `json:"pickupgoodsstatus"  xorm:"PICKUPGOODSSTATUS"`       // 状态 - 1:正常 2:停用 3:注销
+
+	MODIFIERNAME string `json:"modifiername"` // 修改人名称
+	FilterStatus string `json:"-"`            // 状态过淲
+}
+
+func (r *QhjPickGoods) calc() {
+	if r.MODIFYSRC == 1 {
+		r.MODIFIERNAME = mtpcache.GetSystemmangerLoginCode(r.MODIFIERID)
+	} else {
+		r.MODIFIERNAME = mtpcache.GetLoginCodeByLoginId(r.MODIFIERID)
+	}
+	if r.MODIFIERNAME == "" {
+		r.MODIFIERNAME = mtpcache.GetUserNameByUserId(r.MODIFIERID)
+	}
+}
+
+func (r *QhjPickGoods) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.PICKUPGOODSID," +
+		"       t.PICKUPGOODSNAME," +
+		"       t.PICKUPGOODSUNITID," +
+		"       t.PICKUPGOODSAGREEUNIT," +
+		"       to_char(t.PICKUPGOODSDESC) PICKUPGOODSDESC," +
+		"       to_char(t.IMAGEADDRESS) IMAGEADDRESS," +
+		"       t.REMARK," +
+		"       t.MODIFYSRC," +
+		"       t.MODIFIERID," +
+		"       to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
+		"       t.PREPAREDAYS," +
+		"       t.PICKUPGOODSSTATUS" +
+		"  FROM PICKUPGOODS t" +
+		" WHERE 1 = 1"
+	if len(r.FilterStatus) > 0 {
+		sqlId.Join(fmt.Sprintf(" and t.PICKUPGOODSSTATUS in(%v)", r.FilterStatus))
+	}
+	return sqlId.String()
+}
+
+// GetDataEx 获取提货商品
+func (r *QhjPickGoods) GetDataEx() (interface{}, error) {
+	sData := make([]QhjPickGoods, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 4 - 0
routers/router.go

@@ -452,6 +452,10 @@ func InitRouter() *gin.Engine {
 		qhjR.GET("QueryContractLog", qhj.QueryContractLog)
 		qhjR.GET("QueryRStrategy", qhj.QueryRStrategy)
 		qhjR.GET("QueryRSTriggerLog", qhj.QueryRSTriggerLog)
+		qhjR.GET("QueryUserReceiveInfo", qhj.QueryUserReceiveInfo)
+		qhjR.GET("QueryUserCollectConfig", qhj.QueryUserCollectConfig)
+		qhjR.GET("QueryTradeGoodsPickup", qhj.QueryTradeGoodsPickup)
+		qhjR.GET("QueryPickGoods", qhj.QueryPickGoods)
 	}
 
 	return r