接口位置移动,门店归属补漏修改,获取京东用户修改
This commit is contained in:
@@ -737,3 +737,30 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context,
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func RefreshOrdersWithoutJxStoreID(ctx *jxcontext.Context, fromDate, toDate string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
fromDateParam time.Time
|
||||
toDateParam time.Time
|
||||
)
|
||||
if fromDate != "" {
|
||||
fromDateParam = utils.Str2Time(fromDate)
|
||||
}
|
||||
if toDate != "" {
|
||||
toDateParam = utils.Str2Time(toDate)
|
||||
}
|
||||
db := dao.GetDB()
|
||||
task := tasksch.NewParallelTask("订单门店归属补漏", tasksch.NewParallelConfig().SetParallelCount(1), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
_, err = dao.UpdateOrdersWithoutJxStoreID(db, fromDateParam, toDateParam)
|
||||
return retVal, err
|
||||
}, []int{0})
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
if !isAsync {
|
||||
_, err = task.GetResult(0)
|
||||
hint = "1"
|
||||
} else {
|
||||
hint = task.GetID()
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user