refactor(项目管理): 获取项目消息通知人列表去重
This commit is contained in:
parent
104d472d82
commit
01bdeaf03b
|
@ -470,16 +470,19 @@ public class NoticeMessageTaskService {
|
|||
|
||||
public List<OptionDTO> getUserList(String projectId, String keyword) {
|
||||
List<OptionDTO> projectUserSelectList = extProjectUserRoleMapper.getProjectUserSelectList(projectId, keyword);
|
||||
ArrayList<OptionDTO> collect = projectUserSelectList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(OptionDTO::getId))), ArrayList::new));
|
||||
Map<String, String> defaultRelatedUserMap = MessageTemplateUtils.getDefaultRelatedUserMap();
|
||||
defaultRelatedUserMap.forEach((k, v) -> {
|
||||
OptionDTO optionDTO = new OptionDTO();
|
||||
optionDTO.setId(k);
|
||||
optionDTO.setName(v);
|
||||
projectUserSelectList.add(optionDTO);
|
||||
collect.add(optionDTO);
|
||||
});
|
||||
return projectUserSelectList;
|
||||
return collect;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public MessageTemplateConfigDTO getTemplateDetail(String projectId, String taskType, String event, String robotId) {
|
||||
MessageTaskExample messageTaskExample = new MessageTaskExample();
|
||||
messageTaskExample.createCriteria().andProjectIdEqualTo(projectId).andTaskTypeEqualTo(taskType).andEventEqualTo(event);
|
||||
|
|
Loading…
Reference in New Issue