aa
This commit is contained in:
@@ -1753,10 +1753,12 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
)
|
)
|
||||||
sql := `
|
sql := `
|
||||||
SELECT * from store_map where vendor_id = 5 and deleted_at = '1970-01-01 00:00:00' and vendor_org_code = 2
|
SELECT * from store_map where vendor_id = 5 and deleted_at = '1970-01-01 00:00:00' and vendor_org_code = 2
|
||||||
AND store_id = 667431
|
|
||||||
`
|
`
|
||||||
dao.GetRows(db, &storeMaps, sql, nil)
|
dao.GetRows(db, &storeMaps, sql, nil)
|
||||||
for _, v := range storeMaps {
|
// for _, v := range storeMaps {
|
||||||
|
task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetParallelCount(20).SetIsContinueWhenError(true), ctx,
|
||||||
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
|
v := batchItemList[0].(*model.StoreMap)
|
||||||
detail, _ := api.JdShop2API.ShopDetail(utils.Str2Int(v.VendorStoreID))
|
detail, _ := api.JdShop2API.ShopDetail(utils.Str2Int(v.VendorStoreID))
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, v.StoreID, model.VendorIDJDShop, "2")
|
storeDetail, _ := dao.GetStoreDetail(db, v.StoreID, model.VendorIDJDShop, "2")
|
||||||
// var (
|
// var (
|
||||||
@@ -1832,7 +1834,10 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
return retVal, err
|
||||||
|
}, storeMaps)
|
||||||
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
|
task.GetID()
|
||||||
// var (
|
// var (
|
||||||
// db = dao.GetDB()
|
// db = dao.GetDB()
|
||||||
// vendorThingIDs []int64
|
// vendorThingIDs []int64
|
||||||
|
|||||||
Reference in New Issue
Block a user