hgw vor 3 Jahren
Ursprung
Commit
97320479f8

+ 18 - 18
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/LiveRoomServiceImpl.java

@@ -105,7 +105,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
     public PageInfo<LiveRoom> queryPageRoom(Map<String, Object> param) {
         String roomType = WrapperUtil.toStr(param, "roomType");
         Integer liveState = WrapperUtil.toInt(param, "liveState");
-        Long userId = getSysUser().getId();
+        Long userId = this.getSysUser().getId();
         Page<LiveRoom> pageInfo = PageUtil.getPageInfo(param);
         IPage<LiveRoom> page = this.page(pageInfo, Wrappers.<LiveRoom>lambdaQuery()
                 .eq(WrapperUtil.StrPredicate.test(roomType), LiveRoom::getType, roomType)
@@ -123,7 +123,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
      */
     @Override
     public RoomInfoCache studentCheckRoomInfo(String roomUid) {
-        return checkStudentRoom(roomUid, getSysUser());
+        return this.checkStudentRoom(roomUid, this.getSysUser());
     }
 
     /**
@@ -134,7 +134,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
      */
     @Override
     public RoomInfoCache speakerCheckRoomInfo(String roomUid) {
-        Long userId = getSysUser().getId();
+        Long userId = this.getSysUser().getId();
         LiveRoom liveRoom = this.getOne(Wrappers.<LiveRoom>lambdaQuery()
                 .eq(LiveRoom::getRoomUid, roomUid));
         if (Objects.isNull(liveRoom)) {
@@ -225,9 +225,9 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
             room.setCreatedTime(now);
             this.save(room);
             //去融云创建房间及创建房间缓存信息
-            createLiveRoomInfo(room);
+            this.createLiveRoomInfo(room);
             //开课提醒
-            pushLiveCreateRoom(room);
+            this.pushLiveCreateRoom(room);
         });
     }
 
@@ -237,7 +237,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
     private void pushLiveCreateRoom(LiveRoom room) {
         try {
             //查询老师信息
-            SysUser teacherInfo = getSysUser(room.getSpeakerId());
+            SysUser teacherInfo = this.getSysUser(room.getSpeakerId());
             //极光-消息推送
             Map<Long, String> teacherMap = new HashMap<>();
             teacherMap.put(teacherInfo.getId(), teacherInfo.getPhone());
@@ -258,7 +258,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
     @Transactional(rollbackFor = Exception.class)
     public String createTempLiveRoom(Map<String, Object> param) {
         //查询主讲人信息
-        SysUser sysUser = getSysUser();
+        SysUser sysUser = this.getSysUser();
         Long teacherId = sysUser.getId();
         List<LiveRoom> liveRoomList = this.list(Wrappers.<LiveRoom>lambdaQuery()
                 .eq(LiveRoom::getSpeakerId, teacherId)
@@ -308,7 +308,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
      */
     private void createLiveRoomInfo(LiveRoom room) {
         //查询主讲人信息
-        SysUser sysUser = getSysUser(room.getSpeakerId());
+        SysUser sysUser = this.getSysUser(room.getSpeakerId());
         this.createLiveRoomInfo(room, sysUser);
     }
 
@@ -446,15 +446,15 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
         String roomUid = room.getRoomUid();
 
         //删除房间全部人员缓存
-        getTotalUserCache(roomUid).deleteAsync();
+        this.getTotalUserCache(roomUid).deleteAsync();
         //获取在线人员信息
-        RMap<Long, String> onlineUserCache = getOnlineUserCache(roomUid);
+        RMap<Long, String> onlineUserCache = this.getOnlineUserCache(roomUid);
         //删除人员对应直播间编号信息
         onlineUserCache.forEach((id, s) -> redissonClient.getBucket(LIVE_USER_ROOM.replace(USER_ID, id.toString())).deleteAsync());
         //删除房间在线人员缓存
         onlineUserCache.deleteAsync();
         //删除房间信息
-        getLiveRoomInfo(room.getRoomUid()).deleteAsync();
+        this.getLiveRoomInfo(room.getRoomUid()).deleteAsync();
         //删除点赞数
         redissonClient.getBucket(LIVE_ROOM_LIKE.replace(ROOM_UID, room.getRoomUid())).deleteAsync();
         //删除当前主讲人最后一次进入房间的ip
@@ -533,7 +533,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
             }
             String roomUid = userRoom.get();
             //根据房间号获取房间信息
-            RBucket<RoomInfoCache> roomInfoCache = getLiveRoomInfo(roomUid);
+            RBucket<RoomInfoCache> roomInfoCache = this.getLiveRoomInfo(roomUid);
             if (!roomInfoCache.isExists()) {
                 return;
             }
@@ -550,7 +550,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
             //用户id
             Long userId = Long.valueOf(userIdStr);
             //从房间累计用户信息中查询该用户的信息
-            RMap<Long, String> roomTotalUser = getTotalUserCache(roomUid);
+            RMap<Long, String> roomTotalUser = this.getTotalUserCache(roomUid);
             //该房间未查询到用户数据则不处理
             if (!roomTotalUser.isExists() && !roomTotalUser.containsKey(userId)) {
                 return;
@@ -561,7 +561,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
             String userJsonStr = JSONObject.toJSONString(userInfo);
             roomTotalUser.fastPut(userId, userJsonStr);
             //查询在线人员列表
-            RMap<Long, String> onlineUserInfo = getOnlineUserCache(roomUid);
+            RMap<Long, String> onlineUserInfo = this.getOnlineUserCache(roomUid);
             if (!onlineUserInfo.isExists()) {
                 return;
             }
@@ -754,7 +754,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
     //校验学生与房间的关系
     private RoomInfoCache checkStudentRoom(String roomUid, SysUser sysUser) {
         //校验房间是否存在
-        RBucket<RoomInfoCache> roomInfoCache = getLiveRoomInfo(roomUid);
+        RBucket<RoomInfoCache> roomInfoCache = this.getLiveRoomInfo(roomUid);
         if (!roomInfoCache.isExists()) {
             throw new BizException("直播还未开始!");
         }
@@ -988,7 +988,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
         //result
         Map<String, Object> result = new HashMap<>();
         //获取房间信息
-        RBucket<RoomInfoCache> speakerCache = getLiveRoomInfo(roomUid);
+        RBucket<RoomInfoCache> speakerCache = this.getLiveRoomInfo(roomUid);
         if (speakerCache.isExists()) {
             result.put("房间信息信息", speakerCache.get());
         } else {
@@ -1014,7 +1014,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
         int look = 0;
 
         //累计总观看的用户数量
-        List<RoomUserInfoCache> totalUserInfo = getTotalUserInfo(roomUid);
+        List<RoomUserInfoCache> totalUserInfo = this.getTotalUserInfo(roomUid);
         if (CollectionUtils.isNotEmpty(totalUserInfo)) {
             totalLook = totalUserInfo.size();
             result.put("总人员数据", totalUserInfo);
@@ -1023,7 +1023,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
         }
         result.put("总观看人数", totalLook);
         //正在房间观看的用户数据
-        List<RoomUserInfoCache> onlineUserInfo = getOnlineUserInfo(roomUid);
+        List<RoomUserInfoCache> onlineUserInfo = this.getOnlineUserInfo(roomUid);
         if (CollectionUtils.isNotEmpty(onlineUserInfo)) {
             look = onlineUserInfo.size();
             result.put("正在观看的人员信息", onlineUserInfo);