From 958f9ce14a4171d65e8c8527ad201ad8f261c615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 10 Jul 2026 14:22:25 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index f3c9ee3ac..728c510d1 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -133,14 +133,17 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, } case 3: i := 1 + skuIdOffset := 0 for { // 同步商品 fromFoodList, err1 := api.SkuList(utils.Int2Str(fromStore.ID), &ebaiapi.SkuListParams{ - Page: i, + Page: i, + SkuIdOffset: skuIdOffset, }) - if len(fromFoodList.List) == 0 || fromFoodList == nil { + if len(fromFoodList.List) == 0 || fromFoodList == nil || len(fromFoodList.List) < 100 { return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i) } + globals.SugarLogger.Debugf("---------len:=%d", len(fromFoodList.List)) errList := BatchInitSkuEBai2EBai(ctx, fromFoodList.List, api, utils.Int2Str(toStore.ID), VendorCategoryIDMap) if errList != nil { for _, verr := range errList { @@ -149,6 +152,7 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(errList, false)) } i = i + 1 + skuIdOffset = fromFoodList.SkuIdOffset } } @@ -194,7 +198,6 @@ func BatchInitSkuEBai2EBai(ctx *jxcontext.Context, fromSku []*ebaiapi.SkuInfo, t if customSkuID == "" { customSkuID = utils.Int64ToStr(storeSku.SkuId) } - globals.SugarLogger.Debugf("------canshu:%s,%s,%s", storeID, storeSku.CustomSkuId, utils.Format4Output(params, false)) _, err := toApi.SkuCreate(ctx.GetTrackInfo(), storeID, storeSku.CustomSkuID, params) if err != nil { globals.SugarLogger.Debugf("---------name := %s-err := %s", storeSku.Name, err.Error())