فهرست منبع

/WrTrade2/QueryWrOrderDetail
查询仓单委托单增加仓单贸易类型查询参数

zhou.xiaoning 3 سال پیش
والد
کامیت
170f369a38
5فایلهای تغییر یافته به همراه29 افزوده شده و 10 حذف شده
  1. 5 3
      controllers/wrTrade2/qryWrTrade.go
  2. 8 2
      docs/docs.go
  3. 8 2
      docs/swagger.json
  4. 6 2
      docs/swagger.yaml
  5. 2 1
      models/wrTrade2.go

+ 5 - 3
controllers/wrTrade2/qryWrTrade.go

@@ -7,9 +7,10 @@
 package wrTrade2
 
 import (
-	"github.com/gin-gonic/gin"
 	"mtp2_if/global/app"
 	"mtp2_if/models"
+
+	"github.com/gin-gonic/gin"
 )
 
 // QueryOrderQuote
@@ -113,8 +114,8 @@ func QueryWrPosition(c *gin.Context) {
 }
 
 // QueryWrOrderDetail
-// @Summary 查询仓单委托单(挂单)
-// @Description 页面 现货仓单 | 预售仓单 -> 
+// @Summary 查询仓单委托单
+// @Description 页面 现货仓单 | 预售仓单 -> 委托
 // @Produce json
 // @Security ApiKeyAuth
 // @Param page query int false "页码"
@@ -123,6 +124,7 @@ func QueryWrPosition(c *gin.Context) {
 // @Param marketid query int false "仓单贸易市场id"
 // @Param haswr query int true "0:仓单预售 1:仓单贸易"
 // @Param bcancel query int false "是否仅查可撤单据 1:可撤  注:此参数仅对当前记录有效, 且不含47模式市场"
+// @Param wrtradetype query int false "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)"
 // @Param begindate query string false "开始交易日(yyyymmdd)"
 // @Param enddate query string false "结束交易日(yyyymmdd)"
 // @Success 200 {array} models.WrOrderDetail

+ 8 - 2
docs/docs.go

@@ -13338,14 +13338,14 @@ var doc = `{
                         "ApiKeyAuth": []
                     }
                 ],
-                "description": "页面 现货仓单 | 预售仓单 -\u003e 单",
+                "description": "页面 现货仓单 | 预售仓单 -\u003e 委托单",
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
                     "仓单贸易v2"
                 ],
-                "summary": "查询仓单委托单(挂单)",
+                "summary": "查询仓单委托单",
                 "parameters": [
                     {
                         "type": "integer",
@@ -13386,6 +13386,12 @@ var doc = `{
                         "in": "query"
                     },
                     {
+                        "type": "integer",
+                        "description": "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)",
+                        "name": "wrtradetype",
+                        "in": "query"
+                    },
+                    {
                         "type": "string",
                         "description": "开始交易日(yyyymmdd)",
                         "name": "begindate",

+ 8 - 2
docs/swagger.json

@@ -13322,14 +13322,14 @@
                         "ApiKeyAuth": []
                     }
                 ],
-                "description": "页面 现货仓单 | 预售仓单 -\u003e 单",
+                "description": "页面 现货仓单 | 预售仓单 -\u003e 委托单",
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
                     "仓单贸易v2"
                 ],
-                "summary": "查询仓单委托单(挂单)",
+                "summary": "查询仓单委托单",
                 "parameters": [
                     {
                         "type": "integer",
@@ -13370,6 +13370,12 @@
                         "in": "query"
                     },
                     {
+                        "type": "integer",
+                        "description": "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)",
+                        "name": "wrtradetype",
+                        "in": "query"
+                    },
+                    {
                         "type": "string",
                         "description": "开始交易日(yyyymmdd)",
                         "name": "begindate",

+ 6 - 2
docs/swagger.yaml

@@ -27928,7 +27928,7 @@ paths:
       - 仓单贸易v2
   /WrTrade2/QueryWrOrderDetail:
     get:
-      description: 页面 现货仓单 | 预售仓单 -> 
+      description: 页面 现货仓单 | 预售仓单 -> 委托
       parameters:
       - description: 页码
         in: query
@@ -27956,6 +27956,10 @@ paths:
         in: query
         name: bcancel
         type: integer
+      - description: 仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
+        in: query
+        name: wrtradetype
+        type: integer
       - description: 开始交易日(yyyymmdd)
         in: query
         name: begindate
@@ -27979,7 +27983,7 @@ paths:
             $ref: '#/definitions/app.Response'
       security:
       - ApiKeyAuth: []
-      summary: 查询仓单委托单(挂单)
+      summary: 查询仓单委托单
       tags:
       - 仓单贸易v2
   /WrTrade2/QueryWrOutInApply:

+ 2 - 1
models/wrTrade2.go

@@ -796,11 +796,12 @@ select t.HASWR,
     on t.wrtradeorderid = mr.wrtradeorderid
   left join taaccount ta
     on t.accountid = ta.accountid
- where t.WRTRADETYPE = 1 and t.WRTRADEORDERSTATUS not in(2)
+ where t.WRTRADEORDERSTATUS not in(2)
 `
 	sqlId.And("t.USERID", r.USERID)
 	sqlId.And("t.haswr", r.HASWR)
 	sqlId.AndEx("t.marketid", r.MARKETID, r.MARKETID > 0)
+	sqlId.AndEx("t.wrtradetype", r.WRTRADETYPE, r.WRTRADETYPE > 0)
 
 	if r.BCancel == 1 {
 		// 只查委托状态=3 委托成功的单, 且不含47模式的