ソースを参照

查询现货订单接口增加品种相关字段

zou.yingbin 4 年 前
コミット
93ea1bf2c6
4 ファイル変更41 行追加1 行削除
  1. 12 0
      docs/docs.go
  2. 12 0
      docs/swagger.json
  3. 9 0
      docs/swagger.yaml
  4. 8 1
      models/ermcp3.go

+ 12 - 0
docs/docs.go

@@ -22072,6 +22072,18 @@ var doc = `{
                     "description": "对手id",
                     "type": "integer"
                 },
+                "deliverygoodscode": {
+                    "description": "现货品种代码",
+                    "type": "string"
+                },
+                "deliverygoodsid": {
+                    "description": "现货品种ID",
+                    "type": "integer"
+                },
+                "deliverygoodsname": {
+                    "description": "现货品种名称",
+                    "type": "string"
+                },
                 "middlegoodsid": {
                     "description": "套保品种ID",
                     "type": "integer"

+ 12 - 0
docs/swagger.json

@@ -22056,6 +22056,18 @@
                     "description": "对手id",
                     "type": "integer"
                 },
+                "deliverygoodscode": {
+                    "description": "现货品种代码",
+                    "type": "string"
+                },
+                "deliverygoodsid": {
+                    "description": "现货品种ID",
+                    "type": "integer"
+                },
+                "deliverygoodsname": {
+                    "description": "现货品种名称",
+                    "type": "string"
+                },
                 "middlegoodsid": {
                     "description": "套保品种ID",
                     "type": "integer"

+ 9 - 0
docs/swagger.yaml

@@ -6114,6 +6114,15 @@ definitions:
       customeruserid:
         description: 对手id
         type: integer
+      deliverygoodscode:
+        description: 现货品种代码
+        type: string
+      deliverygoodsid:
+        description: 现货品种ID
+        type: integer
+      deliverygoodsname:
+        description: 现货品种名称
+        type: string
       middlegoodsid:
         description: 套保品种ID
         type: integer

+ 8 - 1
models/ermcp3.go

@@ -3021,6 +3021,9 @@ type Ermcp3SCMiddleGoods struct {
 	MIDDLEGOODSID         int64   `json:"middlegoodsid"  xorm:"'MIDDLEGOODSID'"`                         // 套保品种ID
 	NEEDHEDGERATIO        float64 `json:"needhedgeratio"  xorm:"'NEEDHEDGERATIO'"`                       // 套保比例
 	CONTRACTTYPE          int     `json:"contracttype"  xorm:"'CONTRACTTYPE'"`                           // 合同类型 1:采购 -1:销售
+	DELIVERYGOODSID       int64   `json:"deliverygoodsid"  xorm:"'DELIVERYGOODSID'"`                     // 现货品种ID
+	DELIVERYGOODSCODE     string  `json:"deliverygoodscode"  xorm:"'DELIVERYGOODSCODE'"`                 // 现货品种代码
+	DELIVERYGOODSNAME     string  `json:"deliverygoodsname"  xorm:"'DELIVERYGOODSNAME'"`                 //	现货品种名称
 
 	BUYORSELL    int32 `json:"-" form:"buyorsell"`    // 买卖方向, 用作筛选
 	GOODSGROUPID int32 `json:"-" form:"goodsgroupid"` // 期货商品组id, 用作筛选
@@ -3055,12 +3058,16 @@ select s.userid,
        t.middlegoodspricedqty3,
        t.pricedqty,
        t.middlegoodsid,
-       mg.needhedgeratio
+       mg.needhedgeratio,
+       dg.deliverygoodsid,
+       dg.deliverygoodscode,
+       dg.deliverygoodsname
   from ermcp_scmiddlegoods t
  inner join ermcp_spotcontract s
     on t.spotcontractid = s.spotcontractid
   left join wrstandard w
     on t.wrstandardid = w.wrstandardid
+  left join deliverygoods dg on w.deliverygoodsid=dg.deliverygoodsid
   left join erms_middlegoods mg
     on t.middlegoodsid = mg.middlegoodsid
   left join useraccount u1