|
@@ -267,11 +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 (sysUser.getId().intValue() != courseSchedule.getActualTeacherId()) {
|
|
|
+ // 学生课程购买记录
|
|
|
+ CourseScheduleStudentPayment studentPayment = courseScheduleStudentPaymentDao.getByUserIdAndCourseId(sysUser.getId(),
|
|
|
+ courseSchedule.getId());
|
|
|
+ if (Objects.isNull(studentPayment)) {
|
|
|
+ throw new BizException(MessageFormat.format("{0}你已退学", courseSchedule.getName()));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 直播课已结束
|