From a91b313b486ebe3d47c42775372666c70d41dd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 25 Oct 2023 14:26:48 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order.go | 2 -- business/jxstore/cms/system_store_sku.go | 40 ++++++++++++------------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index f94e1c69e..f8a4bca26 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -190,8 +190,6 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m } isDuplicated, order, err := c.addOrderStatus(orderStatus, db) - globals.SugarLogger.Debugf("==========isDuplicated := %s", utils.Format4Output(isDuplicated, false)) - globals.SugarLogger.Debugf("==========orderStatus := %s", utils.Format4Output(orderStatus, false)) if err == nil { dao.Commit(db, txDB) if orderStatus.Status == model.OrderStatusWaybillTipChanged { diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index 1e5fee079..2f77e451e 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -46,10 +46,10 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId switch step { case 1: // 1.加载门店商品,删除商品.当分类下没有商品时.删除分类 - //errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID) - //if errs != nil && len(errs) > 0 { - // return nil, errs[0] - //} + errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID) + if errs != nil && len(errs) > 0 { + return nil, errs[0] + } case 2: // 同步分类 //fromCategoryList, err := fromApi.RetailCatList(utils.Int2Str(fromVendorStoreId)) @@ -80,22 +80,22 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId //} case 3: - i := offSet - for { - // 同步商品 - fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i) - if len(fromFoodList) == 0 || fromFoodList == nil { - return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i) - } - - if err := BatchInitData(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil { - globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false)) - } - if len(fromFoodList) < 100 { - break - } - i++ - } + //i := offSet + //for { + // // 同步商品 + // fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i) + // if len(fromFoodList) == 0 || fromFoodList == nil { + // return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i) + // } + // + // if err := BatchInitData(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil { + // globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false)) + // } + // if len(fromFoodList) < 100 { + // break + // } + // i++ + //} } return