Explorar o código

老师端类型

liujc %!s(int64=2) %!d(string=hai) anos
pai
achega
5e8941bd91

+ 7 - 0
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -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("直播课未开始");