同步错误返回

This commit is contained in:
苏尹岚
2020-02-04 13:47:30 +08:00
parent 1e20a052c9
commit 34ae5e2ce6

View File

@@ -651,12 +651,13 @@ func buildSetFinishHook(task tasksch.ITask, ctx *jxcontext.Context) {
if len(task.GetFailedList()) > 10 {
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
noticeMsg += fmt.Sprintf("[详情点我]%s/billshow/?normal=true&path=%s \n", globals.BackstageHost, downloadURL)
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg)
}
} else if len(task.GetFailedList()) > 0 && len(task.GetFailedList()) <= 10 {
if task.GetErr() != nil {
noticeMsg += utils.Format4Output(buildErrMsgJson(task), true)
}
}
if len(task.GetFailedList()) != 0 {
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg)
}