|
@@ -2102,6 +2102,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("剩余课时不足,无法与现有课时对齐");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ CourseSchedule lastCourseSchedule = surplusCourseWithGroup.stream().max(Comparator.comparing(CourseSchedule::getClassDate)).get();
|
|
|
+ if(vipGroup.getCoursesExpireDate().compareTo(lastCourseSchedule.getEndClassTime())<=0&&!DateUtil.isSameDay(vipGroup.getCoursesExpireDate(), lastCourseSchedule.getEndClassTime())){
|
|
|
+ throw new BizException("排课时间不可超过{}", DateUtil.dateToString(vipGroup.getCoursesExpireDate(), "yyyy年MM月dd日"));
|
|
|
+ }
|
|
|
+
|
|
|
List<CourseScheduleStudentPayment> courseScheduleStudentPaymentList = new ArrayList<>();
|
|
|
for (int i=0;i<surplusCourseWithGroup.size();i++) {
|
|
|
CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
|