添加企业微信消息通知

This commit is contained in:
邹宗楠
2023-01-29 14:43:32 +08:00
parent a4f19220eb
commit bd27c16c38
2 changed files with 31 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"git.rosy.net.cn/jx-callback/business/jxutils/enterprise_msg"
"strings"
"sync"
"time"
@@ -508,7 +509,9 @@ func SendMessage(t *BaseTask) {
} else {
content += ",\n" + t.Error()
}
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "异步任务完成", content)
if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "异步任务完成", content); err != nil {
enterprise_msg.SendUserMessage(authInfo.Mobile, "异步任务完成", "", content)
}
}
}
}