|
@@ -177,14 +177,18 @@ public class ApplyTaskServiceImpl extends ServiceImpl<ApplyTaskDao, ApplyTaskEnt
|
|
|
|
|
|
@Override
|
|
|
public void deleteRule(Long timeId) {
|
|
|
- if (timeId == null)
|
|
|
+ if (timeId == null) {
|
|
|
return;
|
|
|
+ }
|
|
|
LambdaQueryWrapper<StudentApplyEntity> lm = new LambdaQueryWrapper<>();
|
|
|
lm.eq(StudentApplyEntity::getTimePeriodId, timeId);
|
|
|
+ lm.eq(StudentApplyEntity::getCancel, Boolean.FALSE);
|
|
|
+
|
|
|
List<StudentApplyEntity> applyList = studentApplyService.list(lm);
|
|
|
- if (applyList != null && applyList.size() > 0) {
|
|
|
+ if (applyList != null && !applyList.isEmpty()) {
|
|
|
throw new StatusException("考生已经预约,不能删除预约时段");
|
|
|
}
|
|
|
+
|
|
|
timePeriodService.removeById(timeId);
|
|
|
}
|
|
|
|