This commit is contained in:
邹宗楠
2023-10-18 17:30:33 +08:00
parent e0f544edb0
commit 795e30ed6e
2 changed files with 1 additions and 7 deletions

View File

@@ -3,8 +3,6 @@ package cms
import (
"encoding/json"
"fmt"
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"git.rosy.net.cn/jx-callback/globals"
beego "github.com/astaxie/beego/server/web"
"time"
@@ -244,21 +242,17 @@ 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, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %v", i, err2))
globals.SugarLogger.Debugf("RetailBatchInitData err3 :%v", err2)
}
if len(failedFoodList) != 0 {
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, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %v", i, err2))
globals.SugarLogger.Debugf("RetailBatchInitData err3 :%v", err2)
}
if len(failedFoodList) != 0 {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "门店商品同步异常", fmt.Sprintf("%d : %s", i, utils.Format4Output(failedFoodList, false)))
globals.SugarLogger.Debugf("RetailBatchInitData err4 :%s", utils.Format4Output(failedFoodList, false))
}
}

View File

@@ -46,7 +46,7 @@ func (c *TaoBaoVegetableController) GetCode() {
// 创建或者更新账号token
param := &model.VendorOrgCode{
VendorID: model.VendorIDTaoVegetable,
VendorOrgCode: api.TaoVegetableApi.GetVendorOrgCode(),
VendorOrgCode: tokenInfo.UserId,
Comment: tokenInfo.UserNick,
VendorType: "platform",
IsJxCat: 1,