刷新历史订单修改

This commit is contained in:
苏尹岚
2019-11-07 10:55:26 +08:00
parent ba2d403c73
commit 9c5c282735
3 changed files with 52 additions and 6 deletions

View File

@@ -613,7 +613,7 @@ func (c *OrderManager) UpdateOrderFields(order *model.GoodsOrder, fieldList []st
return err
}
func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context, vendorOrderID string, vendorIDs []int, storeID int, fromDate string, toDate string, isAsync, isContinueWhenError bool) (hint string, err error) {
func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context, vendorOrderID string, actIDs []int, vendorIDs []int, storeID int, fromDate string, toDate string, isAsync, isContinueWhenError bool) (hint string, err error) {
db := dao.GetDB()
fromDateParam := utils.Str2Time(fromDate)
toDateParam := utils.Str2Time(toDate)
@@ -621,7 +621,8 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context,
if math.Ceil(toDateParam.Sub(fromDateParam).Hours()/24) > 10 {
return "", errors.New(fmt.Sprintf("查询间隔时间不允许大于10天时间范围[%v] 至 [%v]", fromDate, toDate))
}
orderList, _ := dao.QueryOrders(db, vendorOrderID, vendorIDs, storeID, fromDateParam, toDateParam)
// orderList, _ := dao.QueryOrders(db, vendorOrderID, vendorIDs, storeID, fromDateParam, toDateParam)
orderList, _ := dao.QueryOrdersFilterByAct(db, vendorOrderID, actIDs, vendorIDs, storeID, fromDateParam, toDateParam)
if len(orderList) <= 0 {
return "", errors.New(fmt.Sprintf("未查询到订单!,vendorOrderID : %s, 时间范围:[%v] 至 [%v]", vendorOrderID, fromDate, toDate))
}