From 530ea4677950afe072bf6a65da006435d158b9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 8 Feb 2021 14:14:35 +0800 Subject: [PATCH] aa --- business/jxstore/tempop/tempop.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {