|
@@ -5070,6 +5070,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
liveRoom.setCreatedTime(DateTime.now().toDate());
|
|
|
liveRoom.setLiveStartTime(DateTime.now().toDate());
|
|
|
liveRoom.setTenantId(courseSchedule.getTenantId());
|
|
|
+ courseSchedule.setLiveRoomId(roomUid);
|
|
|
|
|
|
// 创建直播间
|
|
|
imLiveBroadcastRoomService.save(liveRoom);
|
|
@@ -5180,6 +5181,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public LiveGroupWrapper.LiveCourseInfo joinLiveRoomByShare(Integer courseScheduleId,Integer studentId) {
|
|
|
|
|
|
// 判断课程类型
|
|
@@ -5215,6 +5217,18 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if (CourseStatusEnum.OVER.equals(courseSchedule.getStatus())) {
|
|
|
throw new BizException("课程已结束");
|
|
|
}
|
|
|
+ if (StringUtils.isBlank(courseSchedule.getLiveRoomId())) {
|
|
|
+
|
|
|
+ createVipGroupLiveRoom(courseSchedule.getId().toString(), courseSchedule);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ courseShareService.createPaymentRecord(courseSchedule.getId(),studentId);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("getLiveRoomUserInfo>>>> createPaymentRecord error", e);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
return LiveGroupWrapper.LiveCourseInfo.builder()
|
|
|
.studentId(studentId)
|