fix(项目管理): 修复发送通知内容不符问题
This commit is contained in:
parent
a7b04cc69b
commit
6a82fdf2ec
|
@ -1,13 +1,12 @@
|
|||
package io.metersphere.system.notice.sender.impl;
|
||||
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import io.metersphere.system.domain.User;
|
||||
import io.metersphere.system.notice.MessageDetail;
|
||||
import io.metersphere.system.notice.NoticeModel;
|
||||
import io.metersphere.system.notice.Receiver;
|
||||
import io.metersphere.system.notice.sender.AbstractNoticeSender;
|
||||
import io.metersphere.system.notice.utils.DingClient;
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import io.metersphere.system.domain.User;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -25,8 +24,7 @@ public class DingCustomNoticeSender extends AbstractNoticeSender {
|
|||
List<String> mobileList = users.stream().map(User::getPhone).toList();
|
||||
|
||||
LogUtils.info("钉钉自定义机器人收件人: {}", userIds);
|
||||
context += StringUtils.join(mobileList, StringUtils.SPACE);
|
||||
DingClient.send(messageDetail.getWebhook(), "消息通知: \n" + context, mobileList);
|
||||
DingClient.send(messageDetail.getWebhook(), messageDetail.getSubject()+": \n" + context, mobileList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,7 +28,7 @@ public class LarkNoticeSender extends AbstractNoticeSender {
|
|||
|
||||
LogUtils.info("飞书收件人: {}", userIds);
|
||||
context += StringUtils.join(collect, StringUtils.SPACE);
|
||||
LarkClient.send(messageDetail.getWebhook(), "消息通知: \n" + context);
|
||||
LarkClient.send(messageDetail.getWebhook(), messageDetail.getSubject()+": \n" + context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package io.metersphere.system.notice.sender.impl;
|
||||
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import io.metersphere.system.domain.User;
|
||||
import io.metersphere.system.notice.MessageDetail;
|
||||
import io.metersphere.system.notice.NoticeModel;
|
||||
import io.metersphere.system.notice.Receiver;
|
||||
import io.metersphere.system.notice.sender.AbstractNoticeSender;
|
||||
import io.metersphere.system.notice.utils.WeComClient;
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import io.metersphere.system.domain.User;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -24,8 +23,7 @@ public class WeComNoticeSender extends AbstractNoticeSender {
|
|||
List<User> users = super.getUsers(userIds);
|
||||
List<String> mobileList = users.stream().map(User::getPhone).toList();
|
||||
LogUtils.info("企业微信收件人: {}", userIds);
|
||||
context += StringUtils.join(mobileList, StringUtils.SPACE);
|
||||
WeComClient.send(messageDetail.getWebhook(), "消息通知: \n" + context, mobileList);
|
||||
WeComClient.send(messageDetail.getWebhook(), messageDetail.getSubject()+": \n" + context, mobileList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue