刷新历史订单结算价
This commit is contained in:
@@ -622,15 +622,14 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context,
|
||||
return "", errors.New(fmt.Sprintf("查询间隔时间不允许大于10天!时间范围:[%v] 至 [%v]", fromDate, toDate))
|
||||
}
|
||||
// orderList, _ := dao.QueryOrders(db, vendorOrderID, vendorIDs, storeID, fromDateParam, toDateParam)
|
||||
orderList, _ := dao.QueryOrdersFilterByAct(db, vendorOrderID, actIDs, vendorIDs, storeID, fromDateParam, toDateParam)
|
||||
orderList, _ := dao.QueryOrders(db, vendorOrderID, actIDs, vendorIDs, storeID, fromDateParam, toDateParam)
|
||||
if len(orderList) <= 0 {
|
||||
return "", errors.New(fmt.Sprintf("未查询到订单!,vendorOrderID : %s, 时间范围:[%v] 至 [%v]", vendorOrderID, fromDate, toDate))
|
||||
}
|
||||
task := tasksch.NewParallelTask("刷新历史订单结算价", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
v := batchItemList[0].(*model.GoodsOrder)
|
||||
order := batchItemList[0].(*model.GoodsOrder)
|
||||
db := dao.GetDB()
|
||||
order, _ := c.loadOrder(v.VendorOrderID, "", v.VendorID)
|
||||
updateSingleOrderEarningPrice(order, db)
|
||||
dao.Begin(db)
|
||||
defer func() {
|
||||
|
||||
@@ -1169,7 +1169,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in
|
||||
if err = err2; err != nil && !isContinueWhenError {
|
||||
return "", err
|
||||
}
|
||||
localOrders, err2 := dao.QueryOrders(db, "", vendorIDs, storeID, fromDate, toDate.Add(24*time.Hour-time.Second))
|
||||
localOrders, err2 := dao.QueryOrders(db, "", []int{}, vendorIDs, storeID, fromDate, toDate.Add(24*time.Hour-time.Second))
|
||||
if err = err2; err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user