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