Procházet zdrojové kódy

查询期现关联记录接口增加套保名称

zou.yingbin před 4 roky
rodič
revize
e246e5db88
4 změnil soubory, kde provedl 29 přidání a 1 odebrání
  1. 8 0
      docs/docs.go
  2. 8 0
      docs/swagger.json
  3. 6 0
      docs/swagger.yaml
  4. 7 1
      models/ermcp3.go

+ 8 - 0
docs/docs.go

@@ -23280,10 +23280,18 @@ var doc = `{
                     "description": "关联状态 - 1:成功 2:失败",
                     "type": "integer"
                 },
+                "middlegoodscode": {
+                    "description": "套保品种代码",
+                    "type": "string"
+                },
                 "middlegoodsid": {
                     "description": "套保品种ID",
                     "type": "integer"
                 },
+                "middlegoodsname": {
+                    "description": "套保品种名称",
+                    "type": "string"
+                },
                 "relatedlot": {
                     "description": "关联手数",
                     "type": "number"

+ 8 - 0
docs/swagger.json

@@ -23264,10 +23264,18 @@
                     "description": "关联状态 - 1:成功 2:失败",
                     "type": "integer"
                 },
+                "middlegoodscode": {
+                    "description": "套保品种代码",
+                    "type": "string"
+                },
                 "middlegoodsid": {
                     "description": "套保品种ID",
                     "type": "integer"
                 },
+                "middlegoodsname": {
+                    "description": "套保品种名称",
+                    "type": "string"
+                },
                 "relatedlot": {
                     "description": "关联手数",
                     "type": "number"

+ 6 - 0
docs/swagger.yaml

@@ -6876,9 +6876,15 @@ definitions:
       linkstatus:
         description: 关联状态 - 1:成功 2:失败
         type: integer
+      middlegoodscode:
+        description: 套保品种代码
+        type: string
       middlegoodsid:
         description: 套保品种ID
         type: integer
+      middlegoodsname:
+        description: 套保品种名称
+        type: string
       relatedlot:
         description: 关联手数
         type: number

+ 7 - 1
models/ermcp3.go

@@ -3166,6 +3166,9 @@ type Ermcp3TradeLinkDetail struct {
 	GOODSNAME        string `json:"goodsname"  xorm:"'GOODSNAME'"`                     // 合约名称
 	ENUMDICNAME      string `json:"enumdicname"  xorm:"'ENUMDICNAME'"`                 // 单位名称
 	CHANNELBUILDTYPE int32  `json:"channelbuildtype"  xorm:"'CHANNELBUILDTYPE'"`       // 委托单据类型 0:无 1:建仓 2:平仓
+	MIDDLEGOODSCODE  string `json:"middlegoodscode"  xorm:"'MIDDLEGOODSCODE'"`         // 套保品种代码
+	MIDDLEGOODSNAME  string `json:"middlegoodsname"  xorm:"'MIDDLEGOODSNAME'"`         // 套保品种名称
+
 }
 
 func (r *Ermcp3TradeLinkDetail) calc() {
@@ -3208,7 +3211,9 @@ select t.LINKSTATUS,
        g.goodsname,
        g.agreeunit,
        e.enumdicname,
-       k.channelbuildtype
+       k.channelbuildtype,
+       mg.middlegoodscode,
+       mg.middlegoodsname
   from ERMCP_PA_TradeLinkDetail t
  inner join ermcp_pa_tradelink k
     on t.tradeid = k.tradeid
@@ -3221,6 +3226,7 @@ select t.LINKSTATUS,
     on ta.relateduserid = u.userid
   left join goods g
     on t.goodsid = g.goodsid
+  left join erms_middlegoods mg on t.middlegoodsid=mg.middlegoodsid
   left join enumdicitem e
     on g.goodunitid = e.enumitemname
    and e.enumdiccode = 'goodsunit'