Browse Source

修复bug

zyh
小久哥 3 years ago
parent
commit
d662c8dec1
  1. 27
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java

27
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java

@ -181,20 +181,25 @@ public class ProjectServiceImpl implements ProjectService {
//组装 项目成员信息 //组装 项目成员信息
List<Long> memberIDList = new ArrayList<>(); List<Long> memberIDList = new ArrayList<>();
projectListDTOList.forEach(item ->{ projectListDTOList.forEach(item ->{
memberIDList.addAll(item.getMembers().toJavaList(Long.class)); if (ObjectUtil.isNotEmpty(item.getMembers())){
memberIDList.addAll(item.getMembers().toJavaList(Long.class));
}
}); });
memberIDList.stream().distinct().collect(Collectors.toList()); memberIDList.stream().distinct().collect(Collectors.toList());
List<CpUserDO> cpUserList = cpUserMapper.selectList(Wrappers.<CpUserDO>lambdaQuery().in(CpUserDO::getId, memberIDList)); if (ObjectUtil.isNotEmpty(memberIDList)){
projectListDTOList.forEach(item ->{ List<CpUserDO> cpUserList = cpUserMapper.selectList(Wrappers.<CpUserDO>lambdaQuery().in(CpUserDO::getId, memberIDList));
List<CpUserDO> memberList = new ArrayList<>(); projectListDTOList.forEach(item ->{
List<Long> projectMember = item.getMembers().toJavaList(Long.class); List<CpUserDO> memberList = new ArrayList<>();
cpUserList.forEach(user ->{ List<Long> projectMember = item.getMembers().toJavaList(Long.class);
if (projectMember.contains(user.getId())){ cpUserList.forEach(user ->{
memberList.add(user); if (projectMember.contains(user.getId())){
} memberList.add(user);
}
});
item.setMemberList(memberList);
}); });
item.setMemberList(memberList); }
});
//任务完成的 //任务完成的

Loading…
Cancel
Save