This commit is contained in:
苏尹岚
2021-03-17 14:41:27 +08:00
parent 313667604a
commit bb24236869

View File

@@ -429,7 +429,7 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
createList = append(createList, v)
}
}
task2 := tasksch.NewParallelTask("deleteList", tasksch.NewParallelConfig().SetParallelCount(50).SetIsContinueWhenError(true), ctx,
task2 := tasksch.NewParallelTask("deleteList", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
storeID := batchItemList[0].(int)
storeManage := &model.StoreManageState{
@@ -441,7 +441,7 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
}, deleteList)
tasksch.HandleTask(task2, task, true).Run()
task2.GetResult(0)
task3 := tasksch.NewParallelTask("createList", tasksch.NewParallelConfig().SetParallelCount(50).SetIsContinueWhenError(true), ctx,
task3 := tasksch.NewParallelTask("createList", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
storeMap := batchItemList[0].(*model.StoreMap)
if storeMap.VendorOrgCode == "" || storeMap.VendorStoreID == "" {
@@ -454,7 +454,7 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
}, createList)
tasksch.HandleTask(task3, task, true).Run()
task3.GetResult(0)
task4 := tasksch.NewParallelTask("updateList", tasksch.NewParallelConfig().SetParallelCount(50).SetIsContinueWhenError(true), ctx,
task4 := tasksch.NewParallelTask("updateList", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
storeMap := batchItemList[0].(*model.StoreMap)
if storeMap.VendorOrgCode == "" || storeMap.VendorStoreID == "" {