|
@@ -267,6 +267,13 @@ public class RoomServiceImpl implements RoomService {
|
|
|
// 网络课形式:RTC房间,直播间
|
|
|
if (GroupType.LIVE == courseSchedule.getGroupType()) {
|
|
|
|
|
|
+ // 学生课程购买记录
|
|
|
+ CourseScheduleStudentPayment studentPayment = courseScheduleStudentPaymentDao.getByUserIdAndCourseId(sysUser.getId(),
|
|
|
+ courseSchedule.getId());
|
|
|
+ if (Objects.isNull(studentPayment)) {
|
|
|
+ throw new BizException(MessageFormat.format("{0}你已退学", courseSchedule.getName()));
|
|
|
+ }
|
|
|
+
|
|
|
// 直播课已结束
|
|
|
if (CourseStatusEnum.NOT_START == courseSchedule.getStatus()) {
|
|
|
throw new BizException("直播课未开始");
|