|
@@ -120,12 +120,14 @@ public class TaskController {
|
|
|
//检查执行人是否在当前分组的参与人当中
|
|
|
List<GroupParticipator> groupParticipatorList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().eq("group_id", task.getGroupId()));
|
|
|
for (TaskExecutor executor : executorList) {
|
|
|
- boolean b = groupParticipatorList.stream().anyMatch(gp -> gp.getUserId().equals(executor.getExecutorId()));
|
|
|
- if(!b){
|
|
|
- GroupParticipator g=new GroupParticipator();
|
|
|
- g.setGroupId(task.getGroupId());
|
|
|
- g.setUserId(executor.getExecutorId());
|
|
|
- groupParticipatorMapper.insert(g);
|
|
|
+ if(executor.getExecutorId()!=null){
|
|
|
+ boolean b = groupParticipatorList.stream().anyMatch(gp -> gp.getUserId().equals(executor.getExecutorId()));
|
|
|
+ if(!b){
|
|
|
+ GroupParticipator g=new GroupParticipator();
|
|
|
+ g.setGroupId(task.getGroupId());
|
|
|
+ g.setUserId(executor.getExecutorId());
|
|
|
+ groupParticipatorMapper.insert(g);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|