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