Przeglądaj źródła

/Mine/QueryMineTradePositionExs 增加报价小数位等出参

zhou.xiaoning 2 lat temu
rodzic
commit
b5acecbb71
5 zmienionych plików z 30 dodań i 4 usunięć
  1. 4 4
      controllers/guangzuan/tradeService.go
  2. 8 0
      docs/docs.go
  3. 8 0
      docs/swagger.json
  4. 6 0
      docs/swagger.yaml
  5. 4 0
      models/mine.go

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 8 - 0
docs/docs.go

@@ -40845,6 +40845,10 @@ const docTemplate = `{
                     "description": "买持仓冻结数量",
                     "type": "integer"
                 },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
                 "depositremain": {
                     "description": "未付定金",
                     "type": "number"
@@ -40877,6 +40881,10 @@ const docTemplate = `{
                     "description": "发售价(49)",
                     "type": "number"
                 },
+                "quoteminunit": {
+                    "description": "行情最小变动单位 [整数,报价小数位一起使用]",
+                    "type": "integer"
+                },
                 "relatedgoodsid": {
                     "description": "关联交易合约ID",
                     "type": "integer"

+ 8 - 0
docs/swagger.json

@@ -40836,6 +40836,10 @@
                     "description": "买持仓冻结数量",
                     "type": "integer"
                 },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
                 "depositremain": {
                     "description": "未付定金",
                     "type": "number"
@@ -40868,6 +40872,10 @@
                     "description": "发售价(49)",
                     "type": "number"
                 },
+                "quoteminunit": {
+                    "description": "行情最小变动单位 [整数,报价小数位一起使用]",
+                    "type": "integer"
+                },
                 "relatedgoodsid": {
                     "description": "关联交易合约ID",
                     "type": "integer"

+ 6 - 0
docs/swagger.yaml

@@ -14433,6 +14433,9 @@ definitions:
       buyfrozenqty:
         description: 买持仓冻结数量
         type: integer
+      decimalplace:
+        description: 报价小数位
+        type: integer
       depositremain:
         description: 未付定金
         type: number
@@ -14457,6 +14460,9 @@ definitions:
       presaleprice:
         description: 发售价(49)
         type: number
+      quoteminunit:
+        description: 行情最小变动单位 [整数,报价小数位一起使用]
+        type: integer
       relatedgoodsid:
         description: 关联交易合约ID
         type: integer

+ 4 - 0
models/mine.go

@@ -126,6 +126,8 @@ type MineTradePositionEx struct {
 	PRESALEPRICE         float64 `json:"presaleprice" xorm:"PRESALEPRICE"`                 // 发售价(49)
 	TRANSFERDEPOSITRATIO float64 `json:"transferdepositratio" xorm:"TRANSFERDEPOSITRATIO"` // 转让定金比例(49)
 	LASTTRADEDATE        string  `json:"lasttradedate" xorm:"LASTTRADEDATE"`               // 最后交易日期
+	QUOTEMINUNIT         int64   `json:"quoteminunit" xorm:"QUOTEMINUNIT"`                 // 行情最小变动单位 [整数,报价小数位一起使用]
+	DECIMALPLACE         int32   `json:"decimalplace" xorm:"DECIMALPLACE"`                 // 报价小数位
 
 	RELATEDGOODSID int64 `json:"relatedgoodsid" xorm:"RELATEDGOODSID"` // 关联交易合约ID
 
@@ -147,6 +149,8 @@ func (r *MineTradePositionEx) buildSql() string {
 		g.goodscode,
 		g.goodsname,
 		g.goodscode || '/' || g.goodsname "GOODSNAMEDISPLAY",
+		g.QUOTEMINUNIT,
+		g.DECIMALPLACE,
 		tp.buycurpositionqty,
 		tp.buycurholderamount,
 		tp.buyfrozenqty,