This commit is contained in:
邹宗楠
2023-01-29 15:38:17 +08:00
parent bd27c16c38
commit 69ac19b7cc
3 changed files with 61 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package msg
import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxutils/enterprise_msg"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
@@ -30,7 +31,12 @@ func SendUserMessage(msgType string, user *model.User, title, content string) (e
if title != "" {
content = title + "\n" + content
}
err = ddmsg.SendDDUserMessage(msgType, auth.AuthID, title, content)
if err2 := ddmsg.SendDDUserMessage(msgType, auth.AuthID, title, content); err2 != nil {
if msgType == "txt" {
msgType = "text"
}
err = enterprise_msg.SendEnterpriseUserMessage(msgType, auth.AuthID, title, content)
}
} else if auth.Type == weixin.AuthTypeMP && msgType != dingdingapi.MsgTypeMarkdown {
err = weixinmsg.NotifyStoreStatusChanged(auth.AuthID, title, content)
}