diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 4f7b2c2e3..ae010f805 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1833,7 +1833,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { ) storeMaps, _ := dao.GetStoresMapList(db, []int{model.VendorIDJD}, []int{667281}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "320406") things, _ := dao.GetThingMapList(db, model.ThingTypeSku, []int{model.VendorIDJD}, nil, []string{"320406"}) - for i := 0; i < len(things)/50+1; i += 50 { + for i := 0; i < len(things); i += 50 { var idList []*jdapi.SkuIdEntity for j := i; j < 50*k; j++ { if j == len(things)-1 { @@ -1847,6 +1847,9 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { } idLists = append(idLists, idList) k++ + if i >= len(things) { + break + } } task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {