排除每天自动同步

This commit is contained in:
苏尹岚
2020-01-13 15:14:15 +08:00
parent aff821e09d
commit 3525a3ea56

View File

@@ -634,16 +634,18 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, db *dao.DaoDB, taskN
if isAsync {
task.SetFinishHook(func(task tasksch.ITask) {
var noticeMsg string
if len(task.GetFailedList()) > 10 {
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
noticeMsg = fmt.Sprintf("[详情点我]path1=%s\n", downloadURL)
} else if len(task.GetFailedList()) > 0 && len(task.GetFailedList()) <= 10 {
if task.GetErr() != nil {
noticeMsg = utils.Format4Output(buildErrMsgJson(task), true)
if ctx.GetUserName() != "jxadmin" {
if len(task.GetFailedList()) > 10 {
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
noticeMsg = fmt.Sprintf("[详情点我]path1=%s\n", downloadURL)
} else if len(task.GetFailedList()) > 0 && len(task.GetFailedList()) <= 10 {
if task.GetErr() != nil {
noticeMsg = utils.Format4Output(buildErrMsgJson(task), true)
}
}
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg)
}
}
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "同步错误返回", noticeMsg)
}
})
}