|  | @@ -2201,6 +2201,15 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
 | 
	
		
			
				|  |  |          Optional.ofNullable(roomUid).orElseThrow(() -> new BizException("房间编号不能为空!"));
 | 
	
		
			
				|  |  |          Optional.ofNullable(userId).orElseThrow(() -> new BizException("人员编号不能为空!"));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        // 如果是直播课程,判断是否已经结束
 | 
	
		
			
				|  |  | +        Integer count = courseScheduleService.lambdaQuery()
 | 
	
		
			
				|  |  | +                .eq(CourseSchedule::getRoomUid, roomUid)
 | 
	
		
			
				|  |  | +                .eq(CourseSchedule::getStatus, "COMPLETE")
 | 
	
		
			
				|  |  | +                .count();
 | 
	
		
			
				|  |  | +        if (count >0 ) {
 | 
	
		
			
				|  |  | +            throw new BizException("直播课已结束");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          // 设置进入时间
 | 
	
		
			
				|  |  |          RBucket<Long> userStateTimeCache = redissonClient.getBucket(LIVE_USER_LAST_TIME.replace(USER_ID, userId.toString()));
 | 
	
		
			
				|  |  |          long time = DateTime.now().plusSeconds(1).getMillis();
 |