From 616c1e3dc8dd0c6572f83658d13159998e01c949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 26 Jan 2024 17:46:52 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index af4585325..dbacd121c 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -99,12 +99,11 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, // } //} case 3: - i := 0 + i := 1 for { // 同步商品 fromFoodList, err1 := api.SkuList(utils.Int2Str(fromStore.ID), &ebaiapi.SkuListParams{ - Page: 1, - SkuIdOffset: i, + Page: i, }) if len(fromFoodList.List) == 0 || fromFoodList == nil { return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i) @@ -113,7 +112,7 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, if err = BatchInitSkuEBai2EBai(ctx, fromFoodList.List, api, utils.Int2Str(toStore.ID), VendorCategoryIDMap); err != nil { globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false)) } - i = fromFoodList.SkuIdOffset + i = i + 1 } }