This commit is contained in:
邹宗楠
2026-07-10 15:36:05 +08:00
parent 73f0f641fc
commit b58f356601

View File

@@ -151,6 +151,7 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail,
}
globals.SugarLogger.Debugf("--------VendorCategoryIDMap := %s", utils.Format4Output(VendorCategoryIDMap, false))
globals.SugarLogger.Debugf("--------foodListData := %d", len(foodListData))
errList := BatchInitSkuEBai2EBai(ctx, foodListData, api, utils.Int2Str(toStore.ID), VendorCategoryIDMap)
if errList != nil {
for _, verr := range errList {
@@ -176,7 +177,7 @@ func CopyEBaiToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail,
// BatchInitSkuEBai2EBai 批量创建商品
func BatchInitSkuEBai2EBai(ctx *jxcontext.Context, fromSku []*ebaiapi.SkuInfo, toApi *ebaiapi.API, storeID string, VendorCategoryIDMap map[int64]int64) []error {
var errList = make([]error, 0, 0)
for _, storeSku := range fromSku {
for k, storeSku := range fromSku {
params := map[string]interface{}{
"left_num": model.MaxStoreSkuStockQty,
"weight": storeSku.Weight,
@@ -207,6 +208,7 @@ func BatchInitSkuEBai2EBai(ctx *jxcontext.Context, fromSku []*ebaiapi.SkuInfo, t
globals.SugarLogger.Debugf("---------name := %s-err := %s", storeSku.Name, err.Error())
errList = append(errList, err)
}
globals.SugarLogger.Debugf("---------k := %d,%s", k, storeSku.Name)
}
return errList