|
@@ -134,6 +134,15 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
|
|
@Override
|
|
@Override
|
|
public RoomInfoCache speakerCheckRoomInfo(String roomUid) {
|
|
public RoomInfoCache speakerCheckRoomInfo(String roomUid) {
|
|
Long userId = getSysUser().getId();
|
|
Long userId = getSysUser().getId();
|
|
|
|
+ LiveRoom liveRoom = this.getOne(Wrappers.<LiveRoom>lambdaQuery()
|
|
|
|
+ .eq(LiveRoom::getRoomUid, roomUid));
|
|
|
|
+ if (Objects.isNull(liveRoom)) {
|
|
|
|
+ log.error("teacherCheckRoomInfo>>>live not start roomUid: {} userId:{}", roomUid, userId);
|
|
|
|
+ throw new BizException("直播还未开始!");
|
|
|
|
+ }
|
|
|
|
+ if (liveRoom.getLiveState().equals(2)) {
|
|
|
|
+ throw new BizException("直播已结束");
|
|
|
|
+ }
|
|
//校验房间是否存在
|
|
//校验房间是否存在
|
|
RBucket<RoomInfoCache> roomInfoCache = getLiveRoomInfo(roomUid);
|
|
RBucket<RoomInfoCache> roomInfoCache = getLiveRoomInfo(roomUid);
|
|
if (!roomInfoCache.isExists()) {
|
|
if (!roomInfoCache.isExists()) {
|