Compare commits
2 Commits
17b13c1c41
...
fa73d6e1fd
| Author | SHA1 | Date | |
|---|---|---|---|
| fa73d6e1fd | |||
| 6de92dfcd3 |
@@ -353,6 +353,19 @@ public class TaskServiceImpl implements ITaskService {
|
||||
task.setAttentionFlag(CollectionUtils.isEmpty(eachAttention) ? 0 :
|
||||
(eachAttention.stream().map(SpdmTaskAttentionMemberVo::getUserId).collect(Collectors.toList()).contains(userId) ? 1 : 0));
|
||||
}
|
||||
// 兼容老逻辑
|
||||
List<SpdmTaskMemberVo> attentionList = taskMemberVoList.stream().filter(member -> MemberTypeEnum.ATTENTION.getCode().equals(member.getType())).toList();
|
||||
if (CollectionUtils.isNotEmpty(attentionList)) {
|
||||
Map<String, List<SpdmTaskMemberVo>> aMap = attentionList.stream().collect(Collectors.groupingBy(SpdmTaskMemberVo::getTaskId));
|
||||
for (SpdmTaskVo task : taskList) {
|
||||
if (task.getAttentionFlag() == 1) {
|
||||
continue;
|
||||
}
|
||||
List<SpdmTaskMemberVo> eachAttention = aMap.get(task.getUuid());
|
||||
task.setAttentionFlag(CollectionUtils.isEmpty(eachAttention) ? 0 :
|
||||
(eachAttention.stream().map(SpdmTaskMemberVo::getUserId).collect(Collectors.toList()).contains(userId) ? 1 : 0));
|
||||
}
|
||||
}
|
||||
return taskList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user