|
|
@@ -381,6 +381,7 @@ type QueryTradeDetailReq struct {
|
|
|
TradeMode string `form:"tradeMode"`
|
|
|
BuildType int `form:"buildType"`
|
|
|
TradeType string `form:"tradeType"`
|
|
|
+ GoodsID int `form:"goodsID"`
|
|
|
}
|
|
|
|
|
|
// QueryTradeDetailRsp 成交单查询返回模型
|
|
|
@@ -406,6 +407,7 @@ type QueryTradeDetailRsp struct {
|
|
|
// @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
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /Order/QueryTradeDetail [get]
|
|
|
@@ -440,6 +442,9 @@ func QueryTradeDetail(c *gin.Context) {
|
|
|
if req.OrderID > 0 {
|
|
|
s = s.And("TRADE_TRADEDETAIL.ORDERID = ?", req.OrderID)
|
|
|
}
|
|
|
+ if req.GoodsID > 0 {
|
|
|
+ s = s.And("TRADE_TRADEDETAIL.GOODSID = ?", req.GoodsID)
|
|
|
+ }
|
|
|
if len(req.TradeMode) > 0 {
|
|
|
s = s.And(fmt.Sprintf("MARKET.TRADEMODE in (%s)", req.TradeMode))
|
|
|
}
|
|
|
@@ -466,6 +471,7 @@ type QueryHisTradeDetailReq struct {
|
|
|
AccountID string `form:"accountID" binding:"required"`
|
|
|
TradeID int `form:"tradeID"`
|
|
|
OrderID int `form:"orderID"`
|
|
|
+ GoodsID int `form:"goodsID"`
|
|
|
TradeMode string `form:"tradeMode"`
|
|
|
BuildType int `form:"buildType"`
|
|
|
TradeType string `form:"tradeType"`
|
|
|
@@ -493,6 +499,7 @@ type QueryHisTradeDetailRsp struct {
|
|
|
// @Param accountID query string true "资金账户 - 格式:1,2,3"
|
|
|
// @Param tradeID query int false "成交单号"
|
|
|
// @Param orderID query int false "委托单号"
|
|
|
+// @Param goodsID query int false "商品ID"
|
|
|
// @Param tradeMode query string false "交易模式 - 格式:1,2,3"
|
|
|
// @Param buildType query int false "委托单据类型"
|
|
|
// @Param tradeType query string false "成交类别 - 格式:1,2,3"
|
|
|
@@ -532,6 +539,9 @@ func QueryHisTradeDetail(c *gin.Context) {
|
|
|
if req.OrderID > 0 {
|
|
|
s = s.And("HIS_TRADE_TRADEDETAIL.ORDERID = ?", req.OrderID)
|
|
|
}
|
|
|
+ if req.GoodsID > 0 {
|
|
|
+ s = s.And("TRADE_TRADEDETAIL.GOODSID = ?", req.GoodsID)
|
|
|
+ }
|
|
|
if len(req.TradeMode) > 0 {
|
|
|
s = s.And(fmt.Sprintf("MARKET.TRADEMODE in (%s)", req.TradeMode))
|
|
|
}
|