refactor: 处理评审人相关
This commit is contained in:
parent
1610c32f24
commit
b5911dfdaa
|
@ -56,6 +56,6 @@ public interface NoticeConstants {
|
||||||
String EXECUTOR = "EXECUTOR";//负责人(评审人)
|
String EXECUTOR = "EXECUTOR";//负责人(评审人)
|
||||||
String MAINTAINER = "MAINTAINER";//维护人
|
String MAINTAINER = "MAINTAINER";//维护人
|
||||||
String FOLLOW_PEOPLE = "FOLLOW_PEOPLE";//关注人
|
String FOLLOW_PEOPLE = "FOLLOW_PEOPLE";//关注人
|
||||||
String PROCESSOR = "PROCESSOR";//关注人
|
String PROCESSOR = "PROCESSOR";//处理人
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ public abstract class AbstractNoticeSender implements NoticeSender {
|
||||||
switch (userId) {
|
switch (userId) {
|
||||||
case NoticeConstants.RelatedUser.EXECUTOR:
|
case NoticeConstants.RelatedUser.EXECUTOR:
|
||||||
if (StringUtils.equals(NoticeConstants.Event.CREATE, event)) {
|
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()
|
List<Receiver> receivers = relatedUsers.stream()
|
||||||
.map(u -> new Receiver(u, NotificationConstants.Type.SYSTEM_NOTICE.name()))
|
.map(u -> new Receiver(u, NotificationConstants.Type.SYSTEM_NOTICE.name()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
@ -151,7 +151,7 @@ public abstract class AbstractNoticeSender implements NoticeSender {
|
||||||
break;
|
break;
|
||||||
case NoticeConstants.RelatedUser.MAINTAINER:
|
case NoticeConstants.RelatedUser.MAINTAINER:
|
||||||
if (StringUtils.equals(NoticeConstants.Event.COMMENT, event)) {
|
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()
|
List<Receiver> receivers = relatedUsers.stream()
|
||||||
.map(u -> new Receiver(u, NotificationConstants.Type.SYSTEM_NOTICE.name()))
|
.map(u -> new Receiver(u, NotificationConstants.Type.SYSTEM_NOTICE.name()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
Loading…
Reference in New Issue