1
This commit is contained in:
@@ -281,8 +281,8 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
|
||||
}
|
||||
|
||||
// BatchInitSkuMT2MT 批量创建商品
|
||||
func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string, offset int) (errList []*mtwmapi.AppFoodResult, err error) {
|
||||
errList = make([]*mtwmapi.AppFoodResult, 0, 0)
|
||||
func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mtwmapi.API, vendorStoreID string, offset int) ([]*mtwmapi.AppFoodResult, error) {
|
||||
errList := make([]*mtwmapi.AppFoodResult, 0, 0)
|
||||
foodDataList := make([]map[string]interface{}, len(fromSku))
|
||||
for k, storeSku := range fromSku {
|
||||
foodData := make(map[string]interface{})
|
||||
@@ -363,11 +363,13 @@ func BatchInitSkuMT2MT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi
|
||||
failedFoodList, _ := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])
|
||||
if len(failedFoodList) != 0 {
|
||||
errList = append(errList, failedFoodList...)
|
||||
globals.SugarLogger.Debugf("failedFoodList := %s", utils.Format4Output(failedFoodList, false))
|
||||
}
|
||||
} else {
|
||||
failedFoodList, _ := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:(i+1)*10])
|
||||
if len(failedFoodList) != 0 {
|
||||
errList = append(errList, failedFoodList...)
|
||||
globals.SugarLogger.Debugf("failedFoodList := %s", utils.Format4Output(failedFoodList, false))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user