1
This commit is contained in:
@@ -904,8 +904,8 @@ func CopyMtToEBai(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, i
|
||||
VendorCategoryIDMap[v.Code] = parentID
|
||||
}
|
||||
if v.Children != nil && len(v.Children) != 0 {
|
||||
for _, c := range v.Children {
|
||||
childrenCateId, err := ebaiApi.ShopCategoryCreate(utils.Int2Str(toStore.ID), parentID, c.Name, len(v.Children)-k)
|
||||
for k2, c := range v.Children {
|
||||
childrenCateId, err := ebaiApi.ShopCategoryCreate(utils.Int2Str(toStore.ID), parentID, c.Name, len(v.Children)-k2)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("err := RetailCatUpdate Children : %v", err)
|
||||
continue
|
||||
@@ -975,12 +975,15 @@ func BatchInitSkuMtwm2EBai(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, t
|
||||
params["weight"] = storeSku.SkuList[0].Weight
|
||||
params["upc"] = storeSku.SkuList[0].Upc
|
||||
params["name"] = storeSku.Name
|
||||
//params["cat3_id"] = storeSku.CateId
|
||||
if storeSku.CategoryCode != "" {
|
||||
params["category_id"] = VendorCategoryIDMap[storeSku.CategoryCode]
|
||||
} else {
|
||||
params["category_id"] = VendorCategoryIDMap[storeSku.Name]
|
||||
if storeSku.CategoryName != "" {
|
||||
params["category_name"] = storeSku.CategoryName
|
||||
}
|
||||
//params["cat3_id"] = storeSku.CateId
|
||||
//if storeSku.CategoryCode != "" {
|
||||
// params["category_id"] = VendorCategoryIDMap[storeSku.CategoryCode]
|
||||
//} else {
|
||||
// params["category_id"] = VendorCategoryIDMap[storeSku.CategoryName]
|
||||
//}
|
||||
if storeSku.PictureContents != "" {
|
||||
params["desc"] = storeSku.PictureContents
|
||||
}
|
||||
@@ -998,8 +1001,13 @@ func BatchInitSkuMtwm2EBai(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, t
|
||||
//if len(storeSku.SkuProperty) != model.NO {
|
||||
// params["sku_property"] = storeSku.SkuProperty
|
||||
//}
|
||||
customSkuID := int64(storeSku.Ctime + k)
|
||||
_, err := toApi.SkuCreate(ctx.GetTrackInfo(), storeID, customSkuID, params)
|
||||
var customSkuID string = ""
|
||||
if storeSku.AppFoodCode != "" {
|
||||
customSkuID = storeSku.AppFoodCode
|
||||
} else {
|
||||
customSkuID = fmt.Sprintf("%d_%d", storeSku.Ctime, k)
|
||||
}
|
||||
_, err := toApi.SkuCreate2(ctx.GetTrackInfo(), storeID, customSkuID, params)
|
||||
globals.SugarLogger.Debugf("-------erbaierr := %v", err)
|
||||
if err != nil {
|
||||
errList = append(errList, err)
|
||||
|
||||
Reference in New Issue
Block a user