From 4f1933c99132331852e1b255319ebfb1c029c4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 30 Jan 2024 10:33:23 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index b5ba8781b..48d91faf1 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -212,6 +212,7 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA //} case 2: i := offSet + errList := make([]string, 0, 0) for { // 同步商品 fromFoodList, err1 := fromApi.RetailListAll(fromStore.VendorStoreID, i) @@ -220,10 +221,12 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA } if err = BatchInitSkuMT2MT(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil { - globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false)) + errs := utils.Format4Output(err, false) + errList = append(errList, errs) } globals.SugarLogger.Debugf("==============i: %d len: %d", i, len(fromFoodList)) if len(fromFoodList) < 100 { + globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(errList, false)) return nil, nil } i++ @@ -309,6 +312,7 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi if len(foodDataList)%10 != 0 { count += 1 } + globals.SugarLogger.Debugf("=====data := %s", utils.Format4Output(foodDataList, false)) for i := 0; i < count; i++ { if i == count-1 { failedFoodList, _ := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])