deason 8 bulan lalu
induk
melakukan
d181e941c5

+ 1 - 2
src/main/java/com/qmth/exam/reserve/service/impl/ApplyTaskServiceImpl.java

@@ -184,8 +184,7 @@ public class ApplyTaskServiceImpl extends ServiceImpl<ApplyTaskDao, ApplyTaskEnt
         lm.eq(StudentApplyEntity::getTimePeriodId, timeId);
         lm.eq(StudentApplyEntity::getCancel, Boolean.FALSE);
 
-        List<StudentApplyEntity> applyList = studentApplyService.list(lm);
-        if (applyList != null && !applyList.isEmpty()) {
+        if (studentApplyService.count(lm) > 0) {
             throw new StatusException("考生已经预约,不能删除预约时段");
         }