Joburgess 5 éve
szülő
commit
71a3204ee1

+ 5 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java

@@ -198,14 +198,14 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 
 		Date date = new Date();
 		
-		int hours = 2;
+		int days = 24;
 		String str = sysConfigDao.findConfigValue(SysConfigService.ADVANCE_LEAVE_HOURS);
 		if (StringUtils.isNotBlank(str)) {
-			hours = Integer.parseInt(str);
+			days = Integer.parseInt(str);
 		}
-		
-		if(DateUtil.addHours(date, hours).after(courseSchedule.getStartClassTime())){
-			throw new BizException("开课{}个小时之前才可以请假",hours);
+
+		if(DateUtil.addDays1(date, days).after(courseSchedule.getStartClassTime())){
+			throw new BizException("开课{}天之前才可以请假",days);
 		}
 		
 		StudentAttendance studentAttendance  = studentAttendanceDao.findByStatusAndCourseScheduleId(userId,courseScheduleId.intValue());