|
@@ -6543,6 +6543,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(newCourseSchedules)) {
|
|
|
|
|
|
+ // newCourseSchedules集合去重
|
|
|
+ newCourseSchedules = newCourseSchedules.stream()
|
|
|
+ .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(CourseSchedule::getId))), ArrayList::new));
|
|
|
+
|
|
|
// 课程按开始时间排序
|
|
|
newCourseSchedules = newCourseSchedules.stream()
|
|
|
.sorted(Comparator.comparing(CourseSchedule::getStartClassTime))
|
|
@@ -6585,6 +6589,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
int size = beforeCourse.size();
|
|
|
collect = beforeCourse.subList(size - 2, size).stream()
|
|
|
+ .filter(o -> CourseStatusEnum.NOT_START.equals(o.getStatus()))
|
|
|
.map(CourseSchedule::getId)
|
|
|
.distinct().collect(Collectors.toList());
|
|
|
if (CollectionUtils.isNotEmpty(collect)) {
|
|
@@ -6595,7 +6600,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
// 课程后连堂状态
|
|
|
if (afterCourse.get(0).getContinuousCourse()) {
|
|
|
- collect = afterCourse.stream().map(CourseSchedule::getId).distinct().collect(Collectors.toList());
|
|
|
+ collect = afterCourse.stream()
|
|
|
+ .filter(o -> CourseStatusEnum.NOT_START.equals(o.getStatus()))
|
|
|
+ .map(CourseSchedule::getId).distinct().collect(Collectors.toList());
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(collect)) {
|
|
|
// 关联直播间编号
|