1
This commit is contained in:
@@ -43,37 +43,37 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
|
|||||||
switch step {
|
switch step {
|
||||||
case 1:
|
case 1:
|
||||||
// 1.加载门店商品,删除商品.当分类下没有商品时.删除分类
|
// 1.加载门店商品,删除商品.当分类下没有商品时.删除分类
|
||||||
//errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID)
|
errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID)
|
||||||
//if errs != nil && len(errs) > 0 {
|
if errs != nil && len(errs) > 0 {
|
||||||
// return nil, errs[0]
|
return nil, errs[0]
|
||||||
//}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
// 同步分类
|
// 同步分类
|
||||||
//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 {
|
||||||
// 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,
|
||||||
// //CategoryCode: v.Code,
|
//CategoryCode: v.Code,
|
||||||
// SecondaryCategoryCode: c.Code,
|
SecondaryCategoryCode: c.Code,
|
||||||
// SecondaryCategoryName: c.Name,
|
SecondaryCategoryName: c.Name,
|
||||||
// Sequence: c.Sequence,
|
Sequence: c.Sequence,
|
||||||
// }); err != nil {
|
}); err != nil {
|
||||||
// globals.SugarLogger.Debugf("err := RetailCatUpdate Children : %s", utils.Format4Output(c, false))
|
globals.SugarLogger.Debugf("err := RetailCatUpdate Children : %s", utils.Format4Output(c, false))
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
i := offSet
|
i := offSet
|
||||||
|
|||||||
Reference in New Issue
Block a user