fix: 钉钉,企业微信,飞书发送通知时加入[消息通知]关键字

This commit is contained in:
CaptainB 2021-12-16 18:34:32 +08:00 committed by 刘瑞斌
parent fb994aba17
commit f85ebf3d4a
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ public class DingNoticeSender extends AbstractNoticeSender {
OapiRobotSendRequest request = new OapiRobotSendRequest();
request.setMsgtype("text");
OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text();
text.setContent(context);
text.setContent("消息通知: \n" + context);
request.setText(text);
if (CollectionUtils.isNotEmpty(receivers)) {
OapiRobotSendRequest.At at = new OapiRobotSendRequest.At();

View File

@ -30,7 +30,7 @@ public class LarkNoticeSender extends AbstractNoticeSender {
LogUtil.info("飞书收件人: {}", userIds);
context += StringUtils.join(collect, " ");
LarkClient.send(messageDetail.getWebhook(), context);
LarkClient.send(messageDetail.getWebhook(), "消息通知: \n" + context);
}
@Override

View File

@ -22,7 +22,7 @@ public class WeComNoticeSender extends AbstractNoticeSender {
public void sendWechatRobot(MessageDetail messageDetail, NoticeModel noticeModel, String context) {
List<Receiver> receivers = noticeModel.getReceivers();
TextMessage message = new TextMessage(context);
TextMessage message = new TextMessage("消息通知: \n" + context);
if (CollectionUtils.isNotEmpty(receivers)) {
List<String> userIds = receivers.stream()
.map(Receiver::getUserId)