Преглед на файлове

修改部分uint64字段为string

Zhou Xiaoning преди 5 години
родител
ревизия
55c4fd6180
променени са 4 файла, в които са добавени 15 реда и са изтрити 15 реда
  1. 6 6
      controllers/erms2/erms2.go
  2. 3 3
      docs/docs.go
  3. 3 3
      docs/swagger.json
  4. 3 3
      docs/swagger.yaml

+ 6 - 6
controllers/erms2/erms2.go

@@ -19,9 +19,9 @@ type QueryInnerTradeDetailReq struct {
 
 // QueryInnerTradeDetailRsp 内部成交单信息
 type QueryInnerTradeDetailRsp struct {
-	Tradeid           int64     `json:"tradeid"  xorm:"'TRADEID'" binding:"required"`     // 成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+	Tradeid           string    `json:"tradeid"  xorm:"'TRADEID'" binding:"required"`     // 成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
 	Buyorsell         int64     `json:"buyorsell"  xorm:"'BUYORSELL'" binding:"required"` // 方向 - 0:买 1:卖
-	Orderid           int64     `json:"orderid"  xorm:"'ORDERID'"`                        // 委托单号
+	Orderid           string    `json:"orderid"  xorm:"'ORDERID'"`                        // 委托单号
 	Accountid         int64     `json:"accountid"  xorm:"'ACCOUNTID'"`                    // 账号ID
 	Goodsid           int64     `json:"goodsid"  xorm:"'GOODSID'"`                        // 商品ID
 	Marketid          int64     `json:"marketid"  xorm:"'MARKETID'"`                      // 市场ID
@@ -30,7 +30,7 @@ type QueryInnerTradeDetailRsp struct {
 	Tradeqty          int64     `json:"tradeqty"  xorm:"'TRADEQTY'"`                      // 成交数量
 	Channelbuildtype  int64     `json:"channelbuildtype"  xorm:"'CHANNELBUILDTYPE'"`      // 委托单据类型 0:无 1:建仓 2:平仓
 	Closetype         int64     `json:"closetype"  xorm:"'CLOSETYPE'"`                    // 平仓方式 - 0:无 1:平今 2:平昨
-	Relatedouttradeid int64     `json:"relatedouttradeid"  xorm:"'RELATEDOUTTRADEID'"`    // 关联外部成交单ID
+	Relatedouttradeid string    `json:"relatedouttradeid"  xorm:"'RELATEDOUTTRADEID'"`    // 关联外部成交单ID
 
 	Asapplyid      int64     `json:"asapplyid"  xorm:"'ASAPPLYID'" binding:"required"` // 策略申请ID
 	Detailtype     int64     `json:"detailtype"  xorm:"'DETAILTYPE'"`                  // 明细类型 - 1:套利对冲 2:期货换月 3:期货仓位调整
@@ -77,9 +77,9 @@ func QueryInnerTradeDetail(c *gin.Context) {
 	engine := db.GetEngine()
 	datas := make([]QueryInnerTradeDetailRsp, 0)
 	sql := fmt.Sprintf(`select
-							t.Tradeid,
+							to_char(t.Tradeid) Tradeid,
 							t.Buyorsell,
-							t.Orderid,
+							to_char(t.Orderid) Orderid,
 							t.Accountid,
 							t.Goodsid,
 							t.Marketid,
@@ -88,7 +88,7 @@ func QueryInnerTradeDetail(c *gin.Context) {
 							t.Tradeqty,
 							t.Channelbuildtype,
 							t.Closetype,
-							t.Relatedouttradeid,
+							to_char(t.Relatedouttradeid) Relatedouttradeid,
 							ast.Asapplyid,
 							ast.Detailtype,
 							ast.Spotcontractid,

+ 3 - 3
docs/docs.go

@@ -1797,7 +1797,7 @@ var doc = `{
                 },
                 "orderid": {
                     "description": "委托单号",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "outgoodscode": {
                     "description": "商品代码(外部)",
@@ -1805,7 +1805,7 @@ var doc = `{
                 },
                 "relatedouttradeid": {
                     "description": "关联外部成交单ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "remark": {
                     "description": "备注",
@@ -1821,7 +1821,7 @@ var doc = `{
                 },
                 "tradeid": {
                     "description": "成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "tradeprice": {
                     "description": "成交价格",

+ 3 - 3
docs/swagger.json

@@ -1781,7 +1781,7 @@
                 },
                 "orderid": {
                     "description": "委托单号",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "outgoodscode": {
                     "description": "商品代码(外部)",
@@ -1789,7 +1789,7 @@
                 },
                 "relatedouttradeid": {
                     "description": "关联外部成交单ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "remark": {
                     "description": "备注",
@@ -1805,7 +1805,7 @@
                 },
                 "tradeid": {
                     "description": "成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "tradeprice": {
                     "description": "成交价格",

+ 3 - 3
docs/swagger.yaml

@@ -903,13 +903,13 @@ definitions:
         type: integer
       orderid:
         description: 委托单号
-        type: integer
+        type: string
       outgoodscode:
         description: 商品代码(外部)
         type: string
       relatedouttradeid:
         description: 关联外部成交单ID
-        type: integer
+        type: string
       remark:
         description: 备注
         type: string
@@ -921,7 +921,7 @@ definitions:
         type: string
       tradeid:
         description: 成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        type: integer
+        type: string
       tradeprice:
         description: 成交价格
         type: number