接口位置移动,门店归属补漏修改,获取京东用户修改

This commit is contained in:
苏尹岚
2019-12-02 11:12:09 +08:00
parent 6c0c837fae
commit 3c5afc31b6
13 changed files with 359 additions and 347 deletions

View File

@@ -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
}