zhou.xiaoning %!s(int64=2) %!d(string=hai) anos
pai
achega
c65cf27591
Modificáronse 5 ficheiros con 99 adicións e 44 borrados
  1. 10 10
      controllers/sbyj/order.go
  2. 28 8
      docs/docs.go
  3. 28 8
      docs/swagger.json
  4. 23 8
      docs/swagger.yaml
  5. 10 10
      models/sbyj.go

+ 10 - 10
controllers/sbyj/order.go

@@ -68,10 +68,10 @@ func QueryMyTradegoodsdeliveryoffline(c *gin.Context) {
 // @Summary  查询我的交收-订单明细
 // @Produce  json
 // @Security ApiKeyAuth
-// @Param    userid          query    int true  "用户ID"
-// @Param    deliveryorderid query    int true  "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)"
-// @Param    page            query    int false "页码"
-// @Param    pagesize        query    int false "每页条数"
+// @Param    userid          query    int    true  "用户ID"
+// @Param    deliveryorderid query    string true  "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)"
+// @Param    page            query    int    false "页码"
+// @Param    pagesize        query    int    false "每页条数"
 // @Success  200             {array}  models.MyDeliveryofflinedetail
 // @Failure  500             {object} app.Response
 // @Router   /sbyj/QueryMyDeliveryofflinedetail [get]
@@ -87,12 +87,12 @@ func QueryMyDeliveryofflinedetail(c *gin.Context) {
 // @Summary  查询我的交收-操作明细
 // @Produce  json
 // @Security ApiKeyAuth
-// @Param    deliveryorderid query    int true  "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)"
-// @Param    operatetype     query    int false "操作类型 - 1:交收流程 2:付款流水"
-// @Param    deliverypaymode query    int false "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode"
-// @Param    confirmstatus   query    int false "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus"
-// @Param    page            query    int false "页码"
-// @Param    pagesize        query    int false "每页条数"
+// @Param    deliveryorderid query    string true  "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)"
+// @Param    operatetype     query    int    false "操作类型 - 1:交收流程 2:付款流水"
+// @Param    deliverypaymode query    int    false "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode"
+// @Param    confirmstatus   query    int    false "确认状态 - 1:未确认 2:已确认 - 枚举confirmStatus"
+// @Param    page            query    int    false "页码"
+// @Param    pagesize        query    int    false "每页条数"
 // @Success  200             {array}  models.MyDeliveryofflineoperatelog
 // @Failure  500             {object} app.Response
 // @Router   /sbyj/QueryMyDeliveryofflineoperatelog [get]

+ 28 - 8
docs/docs.go

@@ -21303,7 +21303,7 @@ const docTemplate = `{
                         "required": true
                     },
                     {
-                        "type": "integer",
+                        "type": "string",
                         "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
                         "name": "deliveryorderid",
                         "in": "query",
@@ -21357,7 +21357,7 @@ const docTemplate = `{
                 "summary": "查询我的交收-操作明细",
                 "parameters": [
                     {
-                        "type": "integer",
+                        "type": "string",
                         "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
                         "name": "deliveryorderid",
                         "in": "query",
@@ -42008,7 +42008,7 @@ const docTemplate = `{
                 },
                 "deliverydetailid": {
                     "description": "明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliverylot": {
                     "description": "申请交收手数",
@@ -42016,7 +42016,7 @@ const docTemplate = `{
                 },
                 "deliveryorderid": {
                     "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliveryprice": {
                     "description": "交收价格",
@@ -42036,7 +42036,7 @@ const docTemplate = `{
                 },
                 "tradeid": {
                     "description": "成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "userid": {
                     "description": "用户ID",
@@ -42072,7 +42072,7 @@ const docTemplate = `{
                 },
                 "deliveryorderid": {
                     "description": "交收单ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliverypaymode": {
                     "description": "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode",
@@ -42088,7 +42088,7 @@ const docTemplate = `{
                 },
                 "operatelogid": {
                     "description": "明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "operatetime": {
                     "description": "操作时间",
@@ -42826,6 +42826,10 @@ const docTemplate = `{
                     "description": "账户ID",
                     "type": "integer"
                 },
+                "agreeunit": {
+                    "description": "期货合约乘数",
+                    "type": "number"
+                },
                 "buyorsell": {
                     "description": "交收方向 - 0:买 1:卖",
                     "type": "integer"
@@ -42838,6 +42842,10 @@ const docTemplate = `{
                     "description": "完成交易日",
                     "type": "string"
                 },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
                 "deliveryamount": {
                     "description": "交收货款",
                     "type": "number"
@@ -42856,7 +42864,7 @@ const docTemplate = `{
                 },
                 "deliveryorderid": {
                     "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliverypremium": {
                     "description": "交收升贴水(每单位)",
@@ -42890,10 +42898,22 @@ const docTemplate = `{
                     "description": "冻结货款",
                     "type": "number"
                 },
+                "goodscode": {
+                    "description": "期货合约代码(内部)",
+                    "type": "string"
+                },
                 "goodsid": {
                     "description": "商品ID",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "期货合约名称",
+                    "type": "string"
+                },
+                "goodunitid": {
+                    "description": "报价单位ID",
+                    "type": "integer"
+                },
                 "handlestatus": {
                     "description": "处理状态",
                     "type": "integer"

+ 28 - 8
docs/swagger.json

@@ -21294,7 +21294,7 @@
                         "required": true
                     },
                     {
-                        "type": "integer",
+                        "type": "string",
                         "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
                         "name": "deliveryorderid",
                         "in": "query",
@@ -21348,7 +21348,7 @@
                 "summary": "查询我的交收-操作明细",
                 "parameters": [
                     {
-                        "type": "integer",
+                        "type": "string",
                         "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
                         "name": "deliveryorderid",
                         "in": "query",
@@ -41999,7 +41999,7 @@
                 },
                 "deliverydetailid": {
                     "description": "明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliverylot": {
                     "description": "申请交收手数",
@@ -42007,7 +42007,7 @@
                 },
                 "deliveryorderid": {
                     "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliveryprice": {
                     "description": "交收价格",
@@ -42027,7 +42027,7 @@
                 },
                 "tradeid": {
                     "description": "成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "userid": {
                     "description": "用户ID",
@@ -42063,7 +42063,7 @@
                 },
                 "deliveryorderid": {
                     "description": "交收单ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliverypaymode": {
                     "description": "付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode",
@@ -42079,7 +42079,7 @@
                 },
                 "operatelogid": {
                     "description": "明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "operatetime": {
                     "description": "操作时间",
@@ -42817,6 +42817,10 @@
                     "description": "账户ID",
                     "type": "integer"
                 },
+                "agreeunit": {
+                    "description": "期货合约乘数",
+                    "type": "number"
+                },
                 "buyorsell": {
                     "description": "交收方向 - 0:买 1:卖",
                     "type": "integer"
@@ -42829,6 +42833,10 @@
                     "description": "完成交易日",
                     "type": "string"
                 },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
                 "deliveryamount": {
                     "description": "交收货款",
                     "type": "number"
@@ -42847,7 +42855,7 @@
                 },
                 "deliveryorderid": {
                     "description": "交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "deliverypremium": {
                     "description": "交收升贴水(每单位)",
@@ -42881,10 +42889,22 @@
                     "description": "冻结货款",
                     "type": "number"
                 },
+                "goodscode": {
+                    "description": "期货合约代码(内部)",
+                    "type": "string"
+                },
                 "goodsid": {
                     "description": "商品ID",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "期货合约名称",
+                    "type": "string"
+                },
+                "goodunitid": {
+                    "description": "报价单位ID",
+                    "type": "integer"
+                },
                 "handlestatus": {
                     "description": "处理状态",
                     "type": "integer"

+ 23 - 8
docs/swagger.yaml

@@ -15277,13 +15277,13 @@ definitions:
         type: number
       deliverydetailid:
         description: 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        type: integer
+        type: string
       deliverylot:
         description: 申请交收手数
         type: integer
       deliveryorderid:
         description: 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        type: integer
+        type: string
       deliveryprice:
         description: 交收价格
         type: number
@@ -15298,7 +15298,7 @@ definitions:
         type: integer
       tradeid:
         description: 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        type: integer
+        type: string
       userid:
         description: 用户ID
         type: integer
@@ -15325,7 +15325,7 @@ definitions:
         type: integer
       deliveryorderid:
         description: 交收单ID
-        type: integer
+        type: string
       deliverypaymode:
         description: 付款方式 - 1:线上支付2:线下支付 - 枚举deliveryPayMode
         type: integer
@@ -15337,7 +15337,7 @@ definitions:
         type: string
       operatelogid:
         description: 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        type: integer
+        type: string
       operatetime:
         description: 操作时间
         type: string
@@ -15870,6 +15870,9 @@ definitions:
       accountid:
         description: 账户ID
         type: integer
+      agreeunit:
+        description: 期货合约乘数
+        type: number
       buyorsell:
         description: 交收方向 - 0:买 1:卖
         type: integer
@@ -15879,6 +15882,9 @@ definitions:
       closetradedate:
         description: 完成交易日
         type: string
+      decimalplace:
+        description: 报价小数位
+        type: integer
       deliveryamount:
         description: 交收货款
         type: number
@@ -15893,7 +15899,7 @@ definitions:
         type: integer
       deliveryorderid:
         description: 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        type: integer
+        type: string
       deliverypremium:
         description: 交收升贴水(每单位)
         type: number
@@ -15919,9 +15925,18 @@ definitions:
       freezeamount:
         description: 冻结货款
         type: number
+      goodscode:
+        description: 期货合约代码(内部)
+        type: string
       goodsid:
         description: 商品ID
         type: integer
+      goodsname:
+        description: 期货合约名称
+        type: string
+      goodunitid:
+        description: 报价单位ID
+        type: integer
       handlestatus:
         description: 处理状态
         type: integer
@@ -42550,7 +42565,7 @@ paths:
         in: query
         name: deliveryorderid
         required: true
-        type: integer
+        type: string
       - description: 页码
         in: query
         name: page
@@ -42584,7 +42599,7 @@ paths:
         in: query
         name: deliveryorderid
         required: true
-        type: integer
+        type: string
       - description: 操作类型 - 1:交收流程 2:付款流水
         in: query
         name: operatetype

+ 10 - 10
models/sbyj.go

@@ -332,9 +332,9 @@ func (r *MyTradegoodsdeliveryoffline) GetDataByPage() (interface{}, error, int,
 
 // Deliveryofflinedetail 交易合约线下交收明细表
 type MyDeliveryofflinedetail struct {
-	DELIVERYDETAILID int64     `json:"deliverydetailid" xorm:"DELIVERYDETAILID"`                                         // 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-	DELIVERYORDERID  int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID" form:"deliveryorderid" binding:"required"` // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-	TRADEID          int64     `json:"tradeid" xorm:"TRADEID"`                                                           // 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYDETAILID string    `json:"deliverydetailid" xorm:"DELIVERYDETAILID"`                                         // 明细单号(906+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYORDERID  string    `json:"deliveryorderid" xorm:"DELIVERYORDERID" form:"deliveryorderid" binding:"required"` // 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	TRADEID          string    `json:"tradeid" xorm:"TRADEID"`                                                           // 成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
 	BUYORSELL        int32     `json:"buyorsell" xorm:"BUYORSELL"`                                                       // 方向 - 0:买 1:卖
 	USERID           int64     `json:"userid" xorm:"USERID"  form:"userid" binding:"required"`                           // 用户ID
 	ACCOUNTID        int64     `json:"accountid" xorm:"ACCOUNTID"`                                                       // 账号ID
@@ -356,9 +356,9 @@ func (r *MyDeliveryofflinedetail) calc() {
 func (r *MyDeliveryofflinedetail) buildSql() string {
 	var sqlId utils.SQLVal = `
 	SELECT 
-		t.deliverydetailid,
-		t.deliveryorderid,
-		t.tradeid,
+		to_char(t.deliverydetailid) DELIVERYDETAILID,
+		to_char(t.deliveryorderid) DELIVERYORDERID,
+		to_char(t.tradeid) TRADEID,
 		t.buyorsell,
 		t.userid,
 		t.accountid,
@@ -391,8 +391,8 @@ func (r *MyDeliveryofflinedetail) GetDataByPage() (interface{}, error, int, int,
 
 // Deliveryofflineoperatelog 交易合约线下交收操作流水表
 type MyDeliveryofflineoperatelog struct {
-	OPERATELOGID      int64     `json:"operatelogid" xorm:"OPERATELOGID"`                                                 // 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-	DELIVERYORDERID   int64     `json:"deliveryorderid" xorm:"DELIVERYORDERID" form:"deliveryorderid" binding:"required"` // 交收单ID
+	OPERATELOGID      string    `json:"operatelogid" xorm:"OPERATELOGID"`                                                 // 明细单号(907+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	DELIVERYORDERID   string    `json:"deliveryorderid" xorm:"DELIVERYORDERID" form:"deliveryorderid" binding:"required"` // 交收单ID
 	OPERATETYPE       int32     `json:"operatetype" xorm:"OPERATETYPE" form:"operatetype"`                                // 操作类型 - 1:交收流程 2:付款流水
 	CURDELIVERYSTATUS int32     `json:"curdeliverystatus" xorm:"CURDELIVERYSTATUS"`                                       // 当前交收状态(OperateType=1时) -  枚举deliveryStatus
 	AFTDELIVERYSTATUS int32     `json:"aftdeliverystatus" xorm:"AFTDELIVERYSTATUS"`                                       // 操作后交收状态(OperateType=1时) -  枚举deliveryStatus
@@ -420,8 +420,8 @@ func (r *MyDeliveryofflineoperatelog) calc() {
 func (r *MyDeliveryofflineoperatelog) buildSql() string {
 	var sqlId utils.SQLVal = `
 	SELECT 
-		t.operatelogid,
-		t.deliveryorderid,
+		to_char(t.operatelogid) OPERATELOGID,
+		to_char(t.deliveryorderid) DELIVERYORDERID,
 		t.operatetype,
 		t.curdeliverystatus,
 		t.aftdeliverystatus,