|
@@ -6065,6 +6065,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 直播课关联直播间编号
|
|
|
+ String liveRoomId = courseSchedule.getLiveRoomId();
|
|
|
+
|
|
|
List<CourseScheduleWrapper.CourseScheduleTime> courseScheduleTimes = Lists.newArrayList();
|
|
|
if (CollectionUtils.isNotEmpty(newCourseSchedules)) {
|
|
|
|
|
@@ -6077,9 +6080,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
|
|
|
// 获取连堂课第一节信息
|
|
|
- courseSchedule = newCourseSchedules.get(0);
|
|
|
-
|
|
|
- CourseSchedule finalCourseSchedule = courseSchedule;
|
|
|
+ CourseSchedule finalCourseSchedule = newCourseSchedules.get(0);
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
|
|
|
List<Long> collect = newCourseSchedules.stream()
|
|
@@ -6101,7 +6102,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+ // 连堂课直播间编号
|
|
|
+ liveRoomId = finalCourseSchedule.getLiveRoomId();
|
|
|
} else {
|
|
|
|
|
|
// 当前课程信息
|
|
@@ -6121,23 +6123,20 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
// 直播间配置
|
|
|
ImLiveBroadcastRoom liveBroadcastRoom = imLiveBroadcastRoomService.lambdaQuery()
|
|
|
- .eq(ImLiveBroadcastRoom::getRoomUid, courseSchedule.getLiveRoomId())
|
|
|
+ .eq(ImLiveBroadcastRoom::getRoomUid, liveRoomId)
|
|
|
.last("LIMIT 1")
|
|
|
.one();
|
|
|
if (Objects.isNull(liveBroadcastRoom)) {
|
|
|
throw new BizException("请先进入直播课教室");
|
|
|
}
|
|
|
|
|
|
- // 当前时间
|
|
|
- DateTime now = DateTime.now();
|
|
|
-
|
|
|
return CourseScheduleWrapper.LiveCourseSchedule.builder()
|
|
|
- .liveRoomId(courseSchedule.getLiveRoomId())
|
|
|
+ .liveRoomId(liveRoomId)
|
|
|
.subjectId(liveBroadcastRoom.getSubjectId())
|
|
|
.autoCloseFlag(true)
|
|
|
.autoCloseNetworkRoomTime(getCloseNetworkRoomTime(courseSchedule, continueCourseTime))
|
|
|
.surplusTime(DateUtil.secondsBetween(new Date(), courseSchedule.getEndClassTime()))
|
|
|
- .timestamp(now.getMillis())
|
|
|
+ .timestamp(DateTime.now().getMillis())
|
|
|
.courseScheduleTimes(courseScheduleTimes)
|
|
|
.build();
|
|
|
}
|