|
@@ -1117,10 +1117,17 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
CourseSchedule courseSchedule=classGroupCourseSchedulesWithDate.get(i);
|
|
|
calendar.setTime(courseSchedule.getClassDate());
|
|
|
calendar.add(Calendar.DATE, betweenDays);
|
|
|
- if (coursePostPoneInfo.isSkipHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) {
|
|
|
- holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
|
|
|
- holidayDays = holiday.get(calendar.get(Calendar.YEAR));
|
|
|
+ try {
|
|
|
+ if (coursePostPoneInfo.isSkipHoliday() && !holiday.containsKey(calendar.get(Calendar.YEAR))) {
|
|
|
+ holiday = jiaRiFeignService.query(calendar.get(Calendar.YEAR));
|
|
|
+ holidayDays = holiday.get(calendar.get(Calendar.YEAR));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ LOGGER.error("节假日解析错误");
|
|
|
+ } finally {
|
|
|
+ coursePostPoneInfo.setSkipHoliday(false);
|
|
|
}
|
|
|
+
|
|
|
if (coursePostPoneInfo.isSkipHoliday() && holidayDays.containsKey(DateUtil.format(calendar.getTime(), "MMdd"))) {
|
|
|
betweenDays=betweenDays+7;
|
|
|
calendar.add(Calendar.DATE, betweenDays);
|
|
@@ -1128,7 +1135,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
continue;
|
|
|
}
|
|
|
classGroupCourseSchedulesWithDate.get(i).setClassDate(calendar.getTime());
|
|
|
- classGroupCourseSchedulesWithDate.get(i).setSchoolId(null);
|
|
|
}
|
|
|
checkNewCourseSchedules(classGroupCourseSchedulesWithDate,false);
|
|
|
courseScheduleDao.batchUpdate(classGroupCourseSchedulesWithDate);
|