This commit is contained in:
邹宗楠
2024-08-21 15:25:36 +08:00
parent 445285f8fd
commit c3f276cf60

View File

@@ -245,6 +245,7 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
if len(fromFoodList) == 0 || fromFoodList == nil {
return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i)
}
globals.SugarLogger.Debugf("fromFoodList===============: %d", len(fromFoodList))
errDataList, err := BatchInitSkuMT2MT(ctx, fromFoodList, toApi, toStore.VendorStoreID, i)
if err != nil {
@@ -358,7 +359,9 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
if len(foodDataList)%10 != 0 {
count += 1
}
globals.SugarLogger.Debugf("fromFoodList===============count: %d", count)
for i := 0; i < count; i++ {
globals.SugarLogger.Debugf("fromFoodList===============i: %d", i)
if i == count-1 {
failedFoodList, _ := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])
if len(failedFoodList) != 0 {