解决首页新学校管理员报错问题

beetlsql3-dev
yangdj 2 years ago
parent c179b21a79
commit dfe042e597

@ -963,7 +963,10 @@ public class StudentService extends CoreBaseService<Student>{
}
List<Student> select = lambdaQuery.andEq(Student::getStudentStatus, 1).select();
Set<Long> collect = select.stream().map(Student::getClassId).collect(Collectors.toSet());
List<SchoolClass> select1 = schoolClassDao.createLambdaQuery().andIn(SchoolClass::getClassId, collect).select();
List<SchoolClass> select1 = new ArrayList<SchoolClass>();
if(collect.size() > 0){
select1 = schoolClassDao.createLambdaQuery().andIn(SchoolClass::getClassId, collect).select();
}
Set<Long> collect1 = select1.stream().map(SchoolClass::getClassId).collect(Collectors.toSet());
select.removeIf(next -> !collect1.contains(next.getClassId()));
return select;

Loading…
Cancel
Save