1
This commit is contained in:
@@ -76,22 +76,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); 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); err != nil {
|
||||
// globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false))
|
||||
// }
|
||||
// if len(fromFoodList) < 100 {
|
||||
// break
|
||||
// }
|
||||
// i++
|
||||
//}
|
||||
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user