aa
This commit is contained in:
@@ -1877,8 +1877,8 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
utils.DefaultTimeValue, "2", model.VendorIDJDShop,
|
utils.DefaultTimeValue, "2", model.VendorIDJDShop,
|
||||||
}
|
}
|
||||||
dao.GetRows(db, &storeMaps, sql, sqlParams)
|
dao.GetRows(db, &storeMaps, sql, sqlParams)
|
||||||
task := tasksch.NewParallelTask2("yuuuuu", tasksch.NewParallelConfig().SetParallelCount(5).SetIsContinueWhenError(true), ctx,
|
task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetParallelCount(5).SetIsContinueWhenError(true), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, successCount int, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
v := batchItemList[0].(*model.StoreMap)
|
v := batchItemList[0].(*model.StoreMap)
|
||||||
err = api.JdShop2API.CreateGisFence(utils.Str2Int(v.VendorStoreID), "2")
|
err = api.JdShop2API.CreateGisFence(utils.Str2Int(v.VendorStoreID), "2")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -1895,13 +1895,14 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return retVal, successCount, err
|
return retVal, err
|
||||||
}, storeMaps)
|
}, storeMaps)
|
||||||
tasksch.HandleTask(task, nil, false).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
result, err := task.GetResult(0)
|
result, err := task.GetResult(0)
|
||||||
for _, v := range result {
|
for _, v := range result {
|
||||||
stores = append(stores, v.(int))
|
stores = append(stores, v.(int))
|
||||||
}
|
}
|
||||||
|
fmt.Println("resultstores55", stores)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user