|  | @@ -14,6 +14,7 @@ import com.yonge.cooleshow.biz.dal.service.*;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.support.IMHelper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.vo.UserOrderVo;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.common.enums.YesOrNoEnum;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.base.exception.BizException;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.base.page.PageInfo;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.mybatis.support.PageUtil;
 | 
	
	
		
			
				|  | @@ -78,6 +79,8 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SysMessageService sysMessageService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private LiveBroadcastRoomMemberService liveBroadcastRoomMemberService;
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 生成房间UID
 | 
	
		
			
				|  |  |       *
 | 
	
	
		
			
				|  | @@ -598,6 +601,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
 | 
	
		
			
				|  |  |              if (!onlineUserInfo.isExists()) {
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            liveBroadcastRoomMemberService.saveRecord(roomUid,userId, InOrOutEnum.OUT, YesOrNoEnum.NO);
 | 
	
		
			
				|  |  |              //从在线人员列表删除该人员
 | 
	
		
			
				|  |  |              onlineUserInfo.fastRemove(userId);
 | 
	
		
			
				|  |  |              //学员退出 写学生考勤表
 | 
	
	
		
			
				|  | @@ -726,6 +730,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
 | 
	
		
			
				|  |  |          Date now = new Date();
 | 
	
		
			
				|  |  |          roomInfo.setSpeakerState(0);
 | 
	
		
			
				|  |  |          roomInfo.setJoinRoomTime(now);
 | 
	
		
			
				|  |  | +        liveBroadcastRoomMemberService.saveRecord(roomUid, roomInfo.getSpeakerId(), InOrOutEnum.IN, YesOrNoEnum.NO);
 | 
	
		
			
				|  |  |          //查询老师是否有进入过,没有则写老师考勤表的进入时间
 | 
	
		
			
				|  |  |          this.setTeacherAttendance(roomInfo.getSpeakerId(), roomInfo.getCourseGroupId(), roomInfo.getCourseId());
 | 
	
		
			
				|  |  |          //记录当前用户对应的房间uid
 | 
	
	
		
			
				|  | @@ -751,6 +756,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
 | 
	
		
			
				|  |  |          RMap<Long, String> roomTotalUser = this.getTotalUserCache(roomUid);
 | 
	
		
			
				|  |  |          //判断是否第一次进房间
 | 
	
		
			
				|  |  |          RoomUserInfoCache userInfo;
 | 
	
		
			
				|  |  | +        liveBroadcastRoomMemberService.saveRecord(roomUid,userId, InOrOutEnum.IN, YesOrNoEnum.YES);
 | 
	
		
			
				|  |  |          if (roomTotalUser.containsKey(userId)) {
 | 
	
		
			
				|  |  |              //多次进入更新动态进入时间
 | 
	
		
			
				|  |  |              userInfo = JSONObject.toJavaObject(JSONObject.parseObject(roomTotalUser.get(userId)), RoomUserInfoCache.class);
 | 
	
	
		
			
				|  | @@ -1069,5 +1075,17 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
 | 
	
		
			
				|  |  |      public LiveRoom getLiveInRoomBySpeakerId(Long speakerId) {
 | 
	
		
			
				|  |  |          return baseMapper.getLiveInRoomBySpeakerId(speakerId);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public void whetherMic(String roomUid, Integer whetherMic) {
 | 
	
		
			
				|  |  | +        //校验房间是否存在
 | 
	
		
			
				|  |  | +        RBucket<RoomInfoCache> roomInfoCache = getLiveRoomInfo(roomUid);
 | 
	
		
			
				|  |  | +        if (!roomInfoCache.isExists()) {
 | 
	
		
			
				|  |  | +            log.error("teacherCheckRoomInfo>>>live not start  roomUid: {} ", roomUid);
 | 
	
		
			
				|  |  | +            throw new BizException("直播还未开始!");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        RoomInfoCache roomInfo = roomInfoCache.get();
 | 
	
		
			
				|  |  | +        roomInfo.setWhether_mic(whetherMic);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 |