From f984b980fdba31a880a47f8496735f205444a119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 12 Oct 2023 14:29:56 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index 1881070ca..40ce42e4c 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -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) } } }