This commit is contained in:
邹宗楠
2023-10-18 15:58:18 +08:00
parent 69781583b1
commit e0f544edb0

View File

@@ -244,21 +244,21 @@ func BatchInitData(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, toApi *mt
if i == count-1 {
failedFoodList, err2 := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:])
if err2 != nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "6D18CF27A09511ED8127525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %v", i, err2))
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %v", i, err2))
globals.SugarLogger.Debugf("RetailBatchInitData err3 :%v", err2)
}
if len(failedFoodList) != 0 {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "6D18CF27A09511ED8127525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %s", i, utils.Format4Output(failedFoodList, false)))
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %s", i, utils.Format4Output(failedFoodList, false)))
globals.SugarLogger.Debugf("RetailBatchInitData err4 :%s", utils.Format4Output(failedFoodList, false))
}
} else {
failedFoodList, err2 := toApi.RetailBatchInitData(ctx.GetTrackInfo(), vendorStoreID, foodDataList[i*10:(i+1)*10])
if err2 != nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "6D18CF27A09511ED8127525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %v", i, err2))
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %v", i, err2))
globals.SugarLogger.Debugf("RetailBatchInitData err3 :%v", err2)
}
if len(failedFoodList) != 0 {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "6D18CF27A09511ED8127525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %s", i, utils.Format4Output(failedFoodList, false)))
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %s", i, utils.Format4Output(failedFoodList, false)))
globals.SugarLogger.Debugf("RetailBatchInitData err4 :%s", utils.Format4Output(failedFoodList, false))
}
}