This commit is contained in:
邹宗楠
2024-01-26 17:46:52 +08:00
parent 47fed7d90c
commit 616c1e3dc8

View File

@@ -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
}
}