1
This commit is contained in:
@@ -52,24 +52,24 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
|
||||
fromCategoryList, _ := fromApi.RetailCatList(utils.Int2Str(fromVendorStoreId))
|
||||
|
||||
for _, v := range fromCategoryList {
|
||||
err := toApi.RetailCatUpdate(toStore.VendorStoreID, v.Name, &mtwmapi.Param4UpdateCat{
|
||||
categoryErr := toApi.RetailCatUpdate(toStore.VendorStoreID, v.Name, &mtwmapi.Param4UpdateCat{
|
||||
CategoryCode: v.Code,
|
||||
Sequence: v.Sequence,
|
||||
})
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("err := RetailCatUpdate : %s", utils.Format4Output(err, false))
|
||||
if categoryErr != nil {
|
||||
globals.SugarLogger.Debugf("err := RetailCatUpdate : %v", categoryErr)
|
||||
}
|
||||
if v.Children != nil && len(v.Children) != 0 {
|
||||
for _, c := range v.Children {
|
||||
if err := toApi.RetailCatUpdate(toStore.VendorStoreID, v.Name, &mtwmapi.Param4UpdateCat{
|
||||
if err3 := toApi.RetailCatUpdate(toStore.VendorStoreID, v.Name, &mtwmapi.Param4UpdateCat{
|
||||
CategoryNameOrigin: v.Name,
|
||||
//CategoryCodeOrigin: v.Code,
|
||||
//CategoryCode: v.Code,
|
||||
SecondaryCategoryCode: c.Code,
|
||||
SecondaryCategoryName: c.Name,
|
||||
Sequence: c.Sequence,
|
||||
}); err != nil {
|
||||
globals.SugarLogger.Debugf("err := RetailCatUpdate Children : %s", utils.Format4Output(c, false))
|
||||
}); err3 != nil {
|
||||
globals.SugarLogger.Debugf("err := RetailCatUpdate Children : %v", err3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user