|
|
@@ -855,16 +855,21 @@ func GetHsbyMyCount(c *gin.Context) {
|
|
|
// QueryTradePayOrdersReq 待付款信息查询请求参数
|
|
|
type QueryTradePayOrdersReq struct {
|
|
|
app.PageInfo
|
|
|
- AccountIDs string `form:"accountIDs" binding:"required"`
|
|
|
+ AccountIDs string `form:"accountIDs"`
|
|
|
+ SellOrderID int `form:"sellOrderID"`
|
|
|
+ SellAccountID int `form:"sellAccountID"`
|
|
|
}
|
|
|
|
|
|
// QueryTradePayOrders 获取待付款信息
|
|
|
// @Summary 获取待付款信息
|
|
|
+// @Description 说明:"我的订单-待付款"请传入accountIDs;"我的闲置-待收款"请传入sellOrderID和sellAccountID。
|
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Param page query int false "页码"
|
|
|
// @Param pagesize query int false "每页条数"
|
|
|
-// @Param accountIDs query string true "资金账户列表,格式:1,2,3"
|
|
|
+// @Param accountIDs query string false "资金账户列表,格式:1,2,3"
|
|
|
+// @Param sellOrderID query int false "卖方委托单号"
|
|
|
+// @Param sellAccountID query int false "卖方账号ID[报价币种]"
|
|
|
// @Success 200 {object} models.HsbyBuyMyPayOrder
|
|
|
// @Failure 500 {object} app.Response
|
|
|
// @Router /HSBY/QueryTradePayOrders [get]
|
|
|
@@ -879,9 +884,14 @@ func QueryTradePayOrders(c *gin.Context) {
|
|
|
appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
return
|
|
|
}
|
|
|
+ if len(req.AccountIDs) == 0 && (req.SellOrderID == 0 || req.SellAccountID == 0) {
|
|
|
+ logger.GetLogger().Errorf("QueryTradePayOrders failed: 参数错误")
|
|
|
+ appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
// 获取数据
|
|
|
- orders, err := models.GetHsbyBuyMyPayOrders(req.AccountIDs)
|
|
|
+ orders, err := models.GetHsbyBuyMyPayOrders(req.AccountIDs, req.SellOrderID, req.SellAccountID)
|
|
|
if err != nil {
|
|
|
// 查询失败
|
|
|
logger.GetLogger().Errorf("QueryTradePayOrders failed: %s", err.Error())
|