1
This commit is contained in:
@@ -132,14 +132,17 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
|
for {
|
||||||
i := 1
|
i := 1
|
||||||
skuIdOffset := 0
|
skuIdOffset := 0
|
||||||
for {
|
param := &ebaiapi.SkuListParams{
|
||||||
// 同步商品
|
|
||||||
fromFoodList, err1 := api.SkuList(utils.Int2Str(fromStore.ID), &ebaiapi.SkuListParams{
|
|
||||||
Page: i,
|
Page: i,
|
||||||
SkuIdOffset: skuIdOffset,
|
SkuIdOffset: skuIdOffset,
|
||||||
})
|
}
|
||||||
|
|
||||||
|
// 同步商品
|
||||||
|
fromFoodList, err1 := api.SkuList(utils.Int2Str(fromStore.ID), param)
|
||||||
if len(fromFoodList.List) == 0 || fromFoodList == nil || len(fromFoodList.List) < 100 {
|
if len(fromFoodList.List) == 0 || fromFoodList == nil || len(fromFoodList.List) < 100 {
|
||||||
return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i)
|
return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i)
|
||||||
}
|
}
|
||||||
@@ -183,7 +186,7 @@ func BatchInitSkuEBai2EBai(ctx *jxcontext.Context, fromSku []*ebaiapi.SkuInfo, t
|
|||||||
params["name"] = storeSku.Name
|
params["name"] = storeSku.Name
|
||||||
params["cat3_id"] = storeSku.CateId
|
params["cat3_id"] = storeSku.CateId
|
||||||
params["category_id"] = VendorCategoryIDMap[utils.Str2Int64(storeSku.CustomCatList[0].CustomCatID)]
|
params["category_id"] = VendorCategoryIDMap[utils.Str2Int64(storeSku.CustomCatList[0].CustomCatID)]
|
||||||
params["rtf"] = storeSku.Rtf
|
params["desc"] = storeSku.Desc
|
||||||
params["left_num"] = storeSku.LeftNum
|
params["left_num"] = storeSku.LeftNum
|
||||||
params["process_type"] = storeSku.ProcessType
|
params["process_type"] = storeSku.ProcessType
|
||||||
params["process_detail"] = storeSku.ProcessDetail
|
params["process_detail"] = storeSku.ProcessDetail
|
||||||
|
|||||||
Reference in New Issue
Block a user