Forráskód Böngészése

/Common/GetHotGoodses“查询热门商品“:添加返回字段

deng.yinping 2 hete
szülő
commit
54feb7c2c0
4 módosított fájl, 188 hozzáadás és 1 törlés
  1. 60 0
      docs/docs.go
  2. 60 0
      docs/swagger.json
  3. 46 0
      docs/swagger.yaml
  4. 22 1
      models/common.go

+ 60 - 0
docs/docs.go

@@ -41208,18 +41208,70 @@ const docTemplate = `{
         "models.GetHotGoodsesRsp": {
             "type": "object",
             "properties": {
+                "bannerurls": {
+                    "description": "Banner图片(2:1)(逗号分隔)",
+                    "type": "string"
+                },
                 "buyholdamount": {
                     "description": "买持仓额",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "报价货币ID(80:计价货币)",
+                    "type": "integer"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "goodscode": {
+                    "description": "商品代码(内部)",
+                    "type": "string"
+                },
+                "goodscurrencyid": {
+                    "description": "合约货币ID(80:基础货币)",
+                    "type": "integer"
+                },
                 "goodsid": {
                     "description": "商品ID",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsnameen": {
+                    "description": "期货合约名称(英文)",
+                    "type": "string"
+                },
+                "goodsnameth": {
+                    "description": "期货合约名称泰文)",
+                    "type": "string"
+                },
+                "goodsnametw": {
+                    "description": "期货合约名称(繁体)",
+                    "type": "string"
+                },
+                "goodsnamevi": {
+                    "description": "期货合约名称(越南语)",
+                    "type": "string"
+                },
                 "marketid": {
                     "description": "市场ID",
                     "type": "integer"
                 },
+                "outgoodscode": {
+                    "description": "商品代码(外部)",
+                    "type": "string"
+                },
+                "pictureurl": {
+                    "description": "商品图片",
+                    "type": "string"
+                },
+                "quoteminunit": {
+                    "description": "行情最小变动单位 [整数,报价小数位一起使用]",
+                    "type": "integer"
+                },
                 "reckondate": {
                     "description": "日期",
                     "type": "string"
@@ -41228,9 +41280,17 @@ const docTemplate = `{
                     "description": "卖持仓额",
                     "type": "number"
                 },
+                "thumurls": {
+                    "description": "缩略图片(1:1)(逗号分隔)",
+                    "type": "string"
+                },
                 "tradeamount": {
                     "description": "成交额",
                     "type": "number"
+                },
+                "trademode": {
+                    "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
+                    "type": "integer"
                 }
             }
         },

+ 60 - 0
docs/swagger.json

@@ -41200,18 +41200,70 @@
         "models.GetHotGoodsesRsp": {
             "type": "object",
             "properties": {
+                "bannerurls": {
+                    "description": "Banner图片(2:1)(逗号分隔)",
+                    "type": "string"
+                },
                 "buyholdamount": {
                     "description": "买持仓额",
                     "type": "number"
                 },
+                "currencyid": {
+                    "description": "报价货币ID(80:计价货币)",
+                    "type": "integer"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "goodscode": {
+                    "description": "商品代码(内部)",
+                    "type": "string"
+                },
+                "goodscurrencyid": {
+                    "description": "合约货币ID(80:基础货币)",
+                    "type": "integer"
+                },
                 "goodsid": {
                     "description": "商品ID",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsnameen": {
+                    "description": "期货合约名称(英文)",
+                    "type": "string"
+                },
+                "goodsnameth": {
+                    "description": "期货合约名称泰文)",
+                    "type": "string"
+                },
+                "goodsnametw": {
+                    "description": "期货合约名称(繁体)",
+                    "type": "string"
+                },
+                "goodsnamevi": {
+                    "description": "期货合约名称(越南语)",
+                    "type": "string"
+                },
                 "marketid": {
                     "description": "市场ID",
                     "type": "integer"
                 },
+                "outgoodscode": {
+                    "description": "商品代码(外部)",
+                    "type": "string"
+                },
+                "pictureurl": {
+                    "description": "商品图片",
+                    "type": "string"
+                },
+                "quoteminunit": {
+                    "description": "行情最小变动单位 [整数,报价小数位一起使用]",
+                    "type": "integer"
+                },
                 "reckondate": {
                     "description": "日期",
                     "type": "string"
@@ -41220,9 +41272,17 @@
                     "description": "卖持仓额",
                     "type": "number"
                 },
+                "thumurls": {
+                    "description": "缩略图片(1:1)(逗号分隔)",
+                    "type": "string"
+                },
                 "tradeamount": {
                     "description": "成交额",
                     "type": "number"
+                },
+                "trademode": {
+                    "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
+                    "type": "integer"
                 }
             }
         },

+ 46 - 0
docs/swagger.yaml

@@ -12072,24 +12072,70 @@ definitions:
     type: object
   models.GetHotGoodsesRsp:
     properties:
+      bannerurls:
+        description: Banner图片(2:1)(逗号分隔)
+        type: string
       buyholdamount:
         description: 买持仓额
         type: number
+      currencyid:
+        description: 报价货币ID(80:计价货币)
+        type: integer
+      decimalplace:
+        description: 报价小数位
+        type: integer
+      goodscode:
+        description: 商品代码(内部)
+        type: string
+      goodscurrencyid:
+        description: 合约货币ID(80:基础货币)
+        type: integer
       goodsid:
         description: 商品ID
         type: integer
+      goodsname:
+        description: 商品名称
+        type: string
+      goodsnameen:
+        description: 期货合约名称(英文)
+        type: string
+      goodsnameth:
+        description: 期货合约名称泰文)
+        type: string
+      goodsnametw:
+        description: 期货合约名称(繁体)
+        type: string
+      goodsnamevi:
+        description: 期货合约名称(越南语)
+        type: string
       marketid:
         description: 市场ID
         type: integer
+      outgoodscode:
+        description: 商品代码(外部)
+        type: string
+      pictureurl:
+        description: 商品图片
+        type: string
+      quoteminunit:
+        description: 行情最小变动单位 [整数,报价小数位一起使用]
+        type: integer
       reckondate:
         description: 日期
         type: string
       sellholdamount:
         description: 卖持仓额
         type: number
+      thumurls:
+        description: 缩略图片(1:1)(逗号分隔)
+        type: string
       tradeamount:
         description: 成交额
         type: number
+      trademode:
+        description: 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式
+          21:竞拍-大宗式 22:受托竞价
+        type: integer
     type: object
   models.GetJ10NewsData:
     properties:

+ 22 - 1
models/common.go

@@ -1671,14 +1671,35 @@ type GetHotGoodsesRsp struct {
 	BuyHoldAmount  float64 `json:"buyholdamount" xorm:"'CURBUYHOLDAMOUNT'"`  // 买持仓额
 	SellHoldAmount float64 `json:"sellholdamount" xorm:"'CURSELLHODAMOUNT'"` // 卖持仓额
 
+	GoodsCode      string `json:"goodscode"  xorm:"'GOODSCODE'"`             // 商品代码(内部)
+	GoodsName      string `json:"goodsname"  xorm:"'GOODSNAME'"`             // 商品名称
+	CurrencyID     int64  `json:"currencyid"  xorm:"'CURRENCYID'"`           // 报价货币ID(80:计价货币)
+	GoodCurrencyID int64  `json:"goodscurrencyid"  xorm:"'GOODSCURRENCYID'"` // 合约货币ID(80:基础货币)
+	DecimalPlace   int64  `json:"decimalplace"  xorm:"'DECIMALPLACE'"`       // 报价小数位
+	QuoteMinUnit   int64  `json:"quoteminunit"  xorm:"'QUOTEMINUNIT'"`       // 行情最小变动单位 [整数,报价小数位一起使用]
+	OutGoodsCode   string `json:"outgoodscode"  xorm:"'OUTGOODSCODE'"`       // 商品代码(外部)
+	PictureUrl     string `json:"pictureurl"  xorm:"PICTUREURL"`             // 商品图片
+	ThumUrls       string `json:"thumurls" xorm:"THUMURLS"`                  // 缩略图片(1:1)(逗号分隔)
+	BannerUrls     string `json:"bannerurls" xorm:"BANNERURLS"`              // Banner图片(2:1)(逗号分隔)
+	TradeMode      int32  `json:"trademode"  xorm:"'TRADEMODE'"`             // 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
+	GoodsNameTh    string `json:"goodsnameth" xorm:"GOODSNAMETH"`            // 期货合约名称泰文)
+	GoodsNameEn    string `json:"goodsnameen" xorm:"GOODSNAMEEN"`            // 期货合约名称(英文)
+	GoodsNameTw    string `json:"goodsnametw" xorm:"GOODSNAMETW"`            // 期货合约名称(繁体)
+	GoodsNameVi    string `json:"goodsnamevi" xorm:"GOODSNAMEVI"`            // 期货合约名称(越南语)
 }
 
 func GetHotGoodses() (rsp []GetHotGoodsesRsp, err error) {
 	rspdatas := make([]GetHotGoodsesRsp, 0)
 	sql := `
 		SELECT T.RECKONDATE, T.GOODSID, T.MARKETID, 
-		T.TRADEAMOUNT, T.TRADELOT, T.CURBUYHOLDAMOUNT, T.CURSELLHODAMOUNT
+		T.TRADEAMOUNT, T.TRADELOT, T.CURBUYHOLDAMOUNT, T.CURSELLHODAMOUNT,
+		G.GOODSCODE, G.GOODSNAME, G.CURRENCYID, G.GOODSCURRENCYID, G.DECIMALPLACE, G.QUOTEMINUNIT,
+		G.OUTGOODSCODE, G.PICTUREURL, G.THUMURLS, G.BANNERURLS, M.TRADEMODE, GE.GOODSNAMEEN,
+		GE.GOODSNAMETW, GE.GOODSNAMETH, GE.GOODSNAMEVI
 		FROM RECKON_DAYGOODSCOUNT T
+		INNER JOIN GOODS G ON G.GOODSID = T.GOODSID
+		INNER JOIN GOODSEX GE ON GE.GOODSID = T.GOODSID
+		INNER JOIN MARKET M ON M.MARKETID = G.MARKETID
 		WHERE T.RECKONDATE IN (SELECT T.PRETRADEDATE FROM MARKETRUN T WHERE T.MARKETID = 0) 
 		ORDER BY T.TRADEAMOUNT DESC, (T.CURBUYHOLDAMOUNT + T.CURSELLHODAMOUNT) DESC
 	`