refactor: 处理评审人相关

This commit is contained in:
Captain.B 2021-08-24 16:36:57 +08:00 committed by 刘瑞斌
parent 1610c32f24
commit b5911dfdaa
2 changed files with 3 additions and 3 deletions

View File

@ -56,6 +56,6 @@ public interface NoticeConstants {
String EXECUTOR = "EXECUTOR";//负责人(评审人
String MAINTAINER = "MAINTAINER";//维护人
String FOLLOW_PEOPLE = "FOLLOW_PEOPLE";//关注人
String PROCESSOR = "PROCESSOR";//关注
String PROCESSOR = "PROCESSOR";//处理
}
}

View File

@ -126,7 +126,7 @@ public abstract class AbstractNoticeSender implements NoticeSender {
switch (userId) {
case NoticeConstants.RelatedUser.EXECUTOR:
if (StringUtils.equals(NoticeConstants.Event.CREATE, event)) {
List<String> relatedUsers = noticeModel.getRelatedUsers();
List<String> relatedUsers = (List<String>) paramMap.get("userIds");
List<Receiver> receivers = relatedUsers.stream()
.map(u -> new Receiver(u, NotificationConstants.Type.SYSTEM_NOTICE.name()))
.collect(Collectors.toList());
@ -151,7 +151,7 @@ public abstract class AbstractNoticeSender implements NoticeSender {
break;
case NoticeConstants.RelatedUser.MAINTAINER:
if (StringUtils.equals(NoticeConstants.Event.COMMENT, event)) {
List<String> relatedUsers = noticeModel.getRelatedUsers();
List<String> relatedUsers = (List<String>) paramMap.get("userIds");
List<Receiver> receivers = relatedUsers.stream()
.map(u -> new Receiver(u, NotificationConstants.Type.SYSTEM_NOTICE.name()))
.collect(Collectors.toList());