|
@@ -2697,16 +2697,20 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
courseExpiredDate = DateUtil.addSeconds(courseExpiredDate, -1);
|
|
|
practiceGroupBuyParams.setCoursesExpireDate(courseExpiredDate);
|
|
|
|
|
|
- LocalDate courseStartMonday=courseStartDay.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
+// LocalDate courseStartMonday=courseStartDay.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
LocalDate courseExpiredSunday=currentExpiredDay.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
|
|
|
- Date courseStartMondayDate = Date.from(courseStartMonday.atStartOfDay(DateUtil.zoneId).toInstant());
|
|
|
+// Date courseStartMondayDate = Date.from(courseStartMonday.atStartOfDay(DateUtil.zoneId).toInstant());
|
|
|
Date courseExpiredSundayDate = Date.from(courseExpiredSunday.atStartOfDay(DateUtil.zoneId).toInstant());
|
|
|
|
|
|
practiceGroupBuyParams.setName(subject.getName() + "•" + sysUser.getUsername());
|
|
|
List<CourseSchedule> practiceCourses = createPracticeCourses(practiceGroupBuyParams, practiceCourseMinutes);
|
|
|
practiceCourses.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
|
|
|
|
|
|
- List<CourseSchedule> allTeacherCourses = courseScheduleDao.findTeacherCoursesWithDateRange(practiceGroupBuyParams.getUserId(), practiceCourses.get(0).getClassDate(), courseExpiredSundayDate);
|
|
|
+ LocalDate classStartDate=LocalDateTime.ofInstant(practiceCourses.get(0).getClassDate().toInstant(),DateUtil.zoneId).toLocalDate();
|
|
|
+ LocalDate courseStartMonday=classStartDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
|
|
|
+ Date courseStartMondayDate = Date.from(courseStartMonday.atStartOfDay(DateUtil.zoneId).toInstant());
|
|
|
+
|
|
|
+ List<CourseSchedule> allTeacherCourses = courseScheduleDao.findTeacherCoursesWithDateRange(practiceGroupBuyParams.getUserId(), courseStartMondayDate, courseExpiredSundayDate);
|
|
|
|
|
|
TeacherFreeTime teacherFreeTime = teacherFreeTimeDao.findTeacherFreeTime(practiceGroupBuyParams.getUserId());
|
|
|
Integer maxTeacherCourses = null;
|