fix(接口测试): 修复一键同步时消息通知失败问题

https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018363
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018344
--user=郭雨琦
This commit is contained in:
guoyuqi 2022-10-19 13:31:56 +08:00 committed by xiaomeinvG
parent 1c4b683718
commit 2f8f7709b6
1 changed files with 11 additions and 0 deletions

View File

@ -57,6 +57,17 @@ public abstract class AbstractNoticeSender implements NoticeSender {
// 处理 userIds 中包含的特殊值 // 处理 userIds 中包含的特殊值
noticeModel.setReceivers(getRealUserIds(messageDetail, noticeModel, messageDetail.getEvent())); noticeModel.setReceivers(getRealUserIds(messageDetail, noticeModel, messageDetail.getEvent()));
//apiReceiver特殊处理
String apiSpecialType = (String) noticeModel.getParamMap().get("apiSpecialType");
if (apiSpecialType != null && apiSpecialType.equals("API_SPECIAL")) {
String specialReceivers = (String) noticeModel.getParamMap().get("specialReceivers");
List list = JSON.parseArray(specialReceivers);
if (CollectionUtils.isNotEmpty(list)) {
for (Object o : list) {
noticeModel.getReceivers().add(new Receiver(o.toString(), NotificationConstants.Type.MENTIONED_ME.name()));
}
}
}
// 如果配置了模版就直接使用模版 // 如果配置了模版就直接使用模版
if (StringUtils.isNotBlank(messageDetail.getTemplate())) { if (StringUtils.isNotBlank(messageDetail.getTemplate())) {