|
@@ -91,10 +91,10 @@ type QueryTradePositionRsp struct {
|
|
|
// @Summary 持仓汇总查询(合约市场)
|
|
// @Summary 持仓汇总查询(合约市场)
|
|
|
// @Produce json
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
// @Security ApiKeyAuth
|
|
|
-// @Param accountID query string true "资金账户 - 格式:1,2,3"
|
|
|
|
|
-// @Param tradeMode query string false "交易模式 - 格式:1,2,3"
|
|
|
|
|
|
|
+// @Param accountID query string true "资金账户 - 格式:1,2,3"
|
|
|
|
|
+// @Param tradeMode query string false "交易模式 - 格式:1,2,3"
|
|
|
// @Success 200 {object} QueryTradePositionRsp
|
|
// @Success 200 {object} QueryTradePositionRsp
|
|
|
-// @Failure 500 {object} app.Response
|
|
|
|
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
// @Router /Order/QueryTradePosition [get]
|
|
// @Router /Order/QueryTradePosition [get]
|
|
|
// @Tags 通用单据
|
|
// @Tags 通用单据
|
|
|
// 参考通用查询:SearchTradePositionDetail
|
|
// 参考通用查询:SearchTradePositionDetail
|
|
@@ -534,13 +534,14 @@ func QueryHisTradeOrderDetail(c *gin.Context) {
|
|
|
|
|
|
|
|
// QueryTradeDetailReq 成交单查询请求参数
|
|
// QueryTradeDetailReq 成交单查询请求参数
|
|
|
type QueryTradeDetailReq struct {
|
|
type QueryTradeDetailReq struct {
|
|
|
- AccountID string `form:"accountID" binding:"required"`
|
|
|
|
|
- TradeID int `form:"tradeID"`
|
|
|
|
|
- OrderID int `form:"orderID"`
|
|
|
|
|
- TradeMode string `form:"tradeMode"`
|
|
|
|
|
- BuildType int `form:"buildType"`
|
|
|
|
|
- TradeType string `form:"tradeType"`
|
|
|
|
|
- GoodsID int `form:"goodsID"`
|
|
|
|
|
|
|
+ AccountID string `form:"accountID" binding:"required"`
|
|
|
|
|
+ TradeID int `form:"tradeID"`
|
|
|
|
|
+ OrderID int `form:"orderID"`
|
|
|
|
|
+ TradeMode string `form:"tradeMode"`
|
|
|
|
|
+ BuildType int `form:"buildType"`
|
|
|
|
|
+ TradeType string `form:"tradeType"`
|
|
|
|
|
+ GoodsID int `form:"goodsID"`
|
|
|
|
|
+ IncTradeID string `form:"incTradeID"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// QueryTradeDetailRsp 成交单查询返回模型
|
|
// QueryTradeDetailRsp 成交单查询返回模型
|
|
@@ -578,13 +579,14 @@ func (r *QueryTradeDetailRsp) calc() {
|
|
|
// @Produce json
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
// @Security ApiKeyAuth
|
|
|
// @Param accountID query string true "资金账户 - 格式:1,2,3"
|
|
// @Param accountID query string true "资金账户 - 格式:1,2,3"
|
|
|
-// @Param tradeID query int false "成交单号"
|
|
|
|
|
-// @Param orderID query int false "委托单号"
|
|
|
|
|
|
|
+// @Param tradeID query int false "成交单号"
|
|
|
|
|
+// @Param orderID query int false "委托单号"
|
|
|
// @Param tradeMode query string false "交易模式 - 格式:1,2,3"
|
|
// @Param tradeMode query string false "交易模式 - 格式:1,2,3"
|
|
|
-// @Param buildType query int false "委托单据类型"
|
|
|
|
|
-// @Param tradeType query string false "成交类别 - 格式:1,2,3"
|
|
|
|
|
-// @Param goodsID query int false "商品ID"
|
|
|
|
|
-// @Success 200 {object} QueryTradeDetailRsp
|
|
|
|
|
|
|
+// @Param buildType query int false "委托单据类型"
|
|
|
|
|
+// @Param tradeType query string false "成交类别 - 格式:1,2,3"
|
|
|
|
|
+// @Param goodsID query int false "商品ID"
|
|
|
|
|
+// @Param incTradeID query string false "增量成交单号,用于增量查询"
|
|
|
|
|
+// @Success 200 {object} QueryTradeDetailRsp
|
|
|
// @Failure 500 {object} app.Response
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /Order/QueryTradeDetail [get]
|
|
// @Router /Order/QueryTradeDetail [get]
|
|
|
// @Tags 通用单据
|
|
// @Tags 通用单据
|
|
@@ -613,6 +615,9 @@ func QueryTradeDetail(c *gin.Context) {
|
|
|
TRADE_ORDERDETAIL.LISTINGSELECTTYPE, TRADE_PAYORDER.ADVANCERATIO, TRADE_PAYORDER.PAYAMOUNT, TRADE_PAYORDER.TRADECHARGE`).
|
|
TRADE_ORDERDETAIL.LISTINGSELECTTYPE, TRADE_PAYORDER.ADVANCERATIO, TRADE_PAYORDER.PAYAMOUNT, TRADE_PAYORDER.TRADECHARGE`).
|
|
|
Where(fmt.Sprintf("TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
|
|
Where(fmt.Sprintf("TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
|
|
|
Desc("TRADE_TRADEDETAIL.TRADETIME")
|
|
Desc("TRADE_TRADEDETAIL.TRADETIME")
|
|
|
|
|
+ if req.IncTradeID != "" {
|
|
|
|
|
+ s = s.And(fmt.Sprintf("TRADE_TRADEDETAIL.TRADEID > %v", req.IncTradeID))
|
|
|
|
|
+ }
|
|
|
if req.TradeID > 0 {
|
|
if req.TradeID > 0 {
|
|
|
s = s.And("TRADE_TRADEDETAIL.TRADEID = ?", req.TradeID)
|
|
s = s.And("TRADE_TRADEDETAIL.TRADEID = ?", req.TradeID)
|
|
|
}
|
|
}
|