|
@@ -336,7 +336,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
throw new BizException("开课{}小时之前才可以请假", hours);
|
|
|
}
|
|
|
|
|
|
- if (DateUtil.addDays(DateUtils.truncate(date, Calendar.DAY_OF_MONTH), earliestTimeForLeave).before(courseSchedule.getClassDate())) {
|
|
|
+ if (DateUtil.addDays(DateUtils.truncate(date, Calendar.DAY_OF_MONTH), earliestTimeForLeave).compareTo(courseSchedule.getClassDate())<=0) {
|
|
|
throw new BizException("请在开课前{}天内请假", earliestTimeForLeave);
|
|
|
}
|
|
|
|