Kaynağa Gözat

/Order/QueryTradeOrderDetail 接口增加增量委托单号入参

zhou.xiaoning 2 yıl önce
ebeveyn
işleme
e3325f8346

+ 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]

+ 5 - 0
controllers/order/order.go

@@ -299,6 +299,7 @@ type QueryTradeOrderDetailReq struct {
 	OrderStatus string `form:"orderStatus"`
 	TradeMode   string `form:"tradeMode"`
 	OrderID     int    `form:"orderID"`
+	IncOrderID  string `form:"incOrderID"`
 }
 
 // QueryTradeOrderDetailRsp 委托单查询返回模型(合约市场)
@@ -377,6 +378,7 @@ func (r *QueryTradeOrderDetailRsp) calc() {
 // @Param    tradeMode   query    string false "交易模式 - 格式:1,2,3"
 // @Param    orderStatus query    string false "委托状态 - 格式:1,2,3"
 // @Param    orderID     query    int    false "委托单号"
+// @Param    incOrderID  query    string false "增量委托单号"
 // @Success  200         {object} QueryTradeOrderDetailRsp
 // @Failure  500         {object} app.Response
 // @Router   /Order/QueryTradeOrderDetail [get]
@@ -413,6 +415,9 @@ func QueryTradeOrderDetail(c *gin.Context) {
 	if req.OrderID > 0 {
 		s = s.And("TRADE_ORDERDETAIL.ORDERID = ?", req.OrderID)
 	}
+	if req.IncOrderID != "" {
+		s = s.And(fmt.Sprintf("TRADE_ORDERDETAIL.ORDERID > %v", req.IncOrderID))
+	}
 	if err := s.Find(&datas); err != nil {
 		// 查询失败
 		logger.GetLogger().Errorf("QueryTradeOrderDetail failed: %s", err.Error())

+ 6 - 0
docs/docs.go

@@ -14088,6 +14088,12 @@ const docTemplate = `{
                         "description": "委托单号",
                         "name": "orderID",
                         "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "增量委托单号",
+                        "name": "incOrderID",
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 6 - 0
docs/swagger.json

@@ -14079,6 +14079,12 @@
                         "description": "委托单号",
                         "name": "orderID",
                         "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "增量委托单号",
+                        "name": "incOrderID",
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 4 - 0
docs/swagger.yaml

@@ -38015,6 +38015,10 @@ paths:
         in: query
         name: orderID
         type: integer
+      - description: 增量委托单号
+        in: query
+        name: incOrderID
+        type: string
       produces:
       - application/json
       responses: