Browse Source

解决分班报错

dzx 1 year ago
parent
commit
a575f4788f

+ 3 - 0
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java

@@ -395,6 +395,9 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
                         .eq(BandingTaskClassStudent::getStatus, 1)
         );
         List<Long> studentIds = classStudents.stream().map(BandingTaskClassStudent::getNewStudentId).collect(Collectors.toList());
+        if(studentIds.isEmpty()){
+            throw new MyException("未能查询到学生,无法确认");
+        }
         List<BaseNewStudent> list = newStudentService.list(
                 new QueryWrapper<BaseNewStudent>().lambda()
                         .in(BaseNewStudent::getId, studentIds)