同步错误还是返回,通联支付兼容

This commit is contained in:
苏尹岚
2020-03-04 09:51:18 +08:00
parent 0655a8fca1
commit 95b2009579
3 changed files with 41 additions and 30 deletions

View File

@@ -3398,10 +3398,10 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
}
for _, v := range results {
store, err := dao.GetStoreDetail(db, v.StoreID, model.VendorIDMTWM)
food, err := api.MtwmAPI.RetailGet(store.VendorStoreID, utils.Int2Str(v.SkuID))
if err != nil || store == nil {
continue
}
food, err := api.MtwmAPI.RetailGet(store.VendorStoreID, utils.Int2Str(v.SkuID))
var foodData = make(map[string]interface{})
if v.IsSpec != 0 && v.IsSpec == -1 {
v.IsSpec = 0

View File

@@ -663,17 +663,16 @@ func buildSetFinishHook(task tasksch.ITask, ctx *jxcontext.Context) {
} else {
globals.SugarLogger.Debugf("同步错误发送钉钉消息失败, authinfo [%v] , [%v]", *authInfo, err)
}
}else {
if time.Now().Hour() >= 20 || time.Now().Hour() < 7 {
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
user, err := dao.GetUserByID(dao.GetDB(), "mobile", "")
noticeMsg += fmt.Sprintf("[详情点我]%s/billshow/?normal=true&path=%s \n", globals.BackstageHost, downloadURL)
if user != nil && err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "同步错误返回", noticeMsg)
}
}
}
// else {
// if time.Now().Hour() >= 20 || time.Now().Hour() < 7 {
// downloadURL, _, _ := WirteToExcelBySyncFailed(task)
// user, err := dao.GetUserByID(dao.GetDB(), "mobile", "")
// noticeMsg += fmt.Sprintf("[详情点我]%s/billshow/?normal=true&path=%s \n", globals.BackstageHost, downloadURL)
// if user != nil && err == nil {
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "同步错误返回", noticeMsg)
// }
// }
// }
})
}