From 5f24d8f8c8e077ba11614dac1a56a98355098c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 27 Feb 2020 17:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=94=99=E8=AF=AF=E5=8F=91?= =?UTF-8?q?=E9=80=81=E6=B6=88=E6=81=AF=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 4d4b3087f..19ec1fa75 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -660,17 +660,20 @@ func buildSetFinishHook(task tasksch.ITask, ctx *jxcontext.Context) { } if authInfo, err := ctx.GetV2AuthInfo(); err == nil { ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg) - } - } else { - if time.Now().Hour() >= 20 || time.Now().Hour() < 7 { - downloadURL, _, _ := WirteToExcelBySyncFailed(task) - user, err := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913") - 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{ + globals.SugarLogger.Debugf("同步错误发送钉钉消息失败, [%v]", 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) + // } + // } + // } }) }