♻️ 【工作流】 多人任务前端显示头像信息去重

This commit is contained in:
冷冷 committed 2024-08-21 22:27:38 +08:00
1 parent 947789a6f9
commit 5cb73a50d1
1 file changed
+4 -3
@@ -125,8 +125,7 @@ public class NodeFormatUtil {
});
if (CollUtil.isNotEmpty(nodeUserDtos)) {
List<Long> collect = nodeUserDtos.stream().map(w -> Long.valueOf(w.getId()))
.collect(Collectors.toList());
List<Long> collect = nodeUserDtos.stream().map(w -> Long.valueOf(w.getId())).collect(Collectors.toList());
for (Long aLong : collect) {
UserVo userVo = buildUser(aLong);
userVoList.addAll(CollUtil.newArrayList(userVo));
@@ -194,7 +193,9 @@ public class NodeFormatUtil {
userVoList.addAll(tempList);
}
nodeVo.setUserVoList(userVoList);
// 根据userVo 的ID 去重userVoList
nodeVo.setUserVoList(CollUtil.distinct(userVoList, UserVo::getId, true));
List<NodeVo> branchList = new ArrayList<>();