浏览代码

1、/WrTrade2/QueryWrTradeOrderDetail 结果过滤“持仓过户和协议转让”单据;
2、/Market/GetMarketSections 增加trademode出参。

zhou.xiaoning 2 年之前
父节点
当前提交
81d80b373c
共有 6 个文件被更改,包括 33 次插入19 次删除
  1. 4 4
      controllers/guangzuan/tradeService.go
  2. 4 0
      docs/docs.go
  3. 4 0
      docs/swagger.json
  4. 3 0
      docs/swagger.yaml
  5. 1 0
      models/ori.go
  6. 17 15
      models/wrTrade2.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]

+ 4 - 0
docs/docs.go

@@ -41415,6 +41415,10 @@ const docTemplate = `{
                     "description": "排序",
                     "type": "integer"
                 },
+                "trademode": {
+                    "description": "交易模式",
+                    "type": "integer"
+                },
                 "updatetime": {
                     "description": "更新时间",
                     "type": "string"

+ 4 - 0
docs/swagger.json

@@ -41406,6 +41406,10 @@
                     "description": "排序",
                     "type": "integer"
                 },
+                "trademode": {
+                    "description": "交易模式",
+                    "type": "integer"
+                },
                 "updatetime": {
                     "description": "更新时间",
                     "type": "string"

+ 3 - 0
docs/swagger.yaml

@@ -14031,6 +14031,9 @@ definitions:
       orderindex:
         description: 排序
         type: integer
+      trademode:
+        description: 交易模式
+        type: integer
       updatetime:
         description: 更新时间
         type: string

+ 1 - 0
models/ori.go

@@ -788,6 +788,7 @@ type Marketsectionconfignew struct {
 	DISPLAYNAME     string    `json:"displayname" xorm:"DISPLAYNAME"`         // 显示名称
 	MARKETIDS       string    `json:"marketids" xorm:"MARKETIDS"`             // 市场IDs - 逗号分隔
 	UPDATETIME      time.Time `json:"updatetime" xorm:"UPDATETIME"`           // 更新时间
+	TRADEMODE       int32     `json:"trademode" xorm:"TRADEMODE"`             // 交易模式
 }
 
 // TableName is MARKETSECTIONCONFIGNEW

+ 17 - 15
models/wrTrade2.go

@@ -3349,21 +3349,23 @@ func (r *WrTradeOrderDetail) calc() {
 }
 
 func (r *WrTradeOrderDetail) buildSql() string {
-	var sqlId utils.SQLVal = "select to_char(t.orderid) orderid," +
-		"       t.buyorsell," +
-		"       t.goodsid," +
-		"       t.orderprice," +
-		"       t.orderqty - t.tradeqty orderqty," +
-		"       u.userid," +
-		"       u.accountname username," +
-		"       t.orderstatus" +
-		"  from trade_orderdetail t" +
-		"  left join taaccount ta" +
-		"    on t.accountid = ta.accountid" +
-		"  left join useraccount u" +
-		"    on ta.relateduserid = u.userid" +
-		" where 1 = 1" +
-		"   and t.orderstatus in(3,7,12)"
+	var sqlId utils.SQLVal = `
+		select to_char(t.orderid) orderid,
+		       t.buyorsell,
+		       t.goodsid,
+		       t.orderprice,
+		       t.orderqty - t.tradeqty orderqty,
+		       u.userid,
+		       u.accountname username,
+		       t.orderstatus
+		  from trade_orderdetail t
+		  left join taaccount ta
+		    on t.accountid = ta.accountid
+		  left join useraccount u
+		    on ta.relateduserid = u.userid
+		 where 1 = 1
+		   and t.orderstatus in(3,7,12) 
+		   and (t.OPERATETYPE <> 26 and t.OPERATETYPE <> 15) `
 	sqlId.And("t.GOODSID", r.GOODSID)
 	sqlId.And("t.BUYORSELL", r.BUYORSELL)