|
@@ -420,6 +420,9 @@ public class ExamStudentService {
|
|
|
Exam exam = examRepo.findOne(examId);
|
|
|
if(exam.getCanStuDel()){
|
|
|
List<ExamStudent> examStudents = examStudentRepo.findByExamId(examId);
|
|
|
+ if(examStudents == null || examStudents.size() == 0){
|
|
|
+ return;
|
|
|
+ }
|
|
|
examStudentRepo.deleteInBatch(examStudents);
|
|
|
}else{
|
|
|
throw new RuntimeException("该考试已开始,不能删除");
|