lyhzzz 2 years ago
parent
commit
3429af4523

+ 3 - 2
src/main/java/com/fdkankan/tk/service/DataCountService.java

@@ -232,6 +232,7 @@ public class DataCountService {
                 });
             }
             List<RoomVisitLog> roomLives = roomVisitLogService.getByRoomId(record.getRoomId());
+            List<RoomShareLog> shareLogs = roomShareLogService.getByRoomId(record.getRoomId());
             Long roomTime = getRoomTime(roomLives);
 
             RoomListDataVo roomListDataVo = new RoomListDataVo();
@@ -240,8 +241,8 @@ public class DataCountService {
             roomListDataVo.setCreateTime(record.getCreateTime());
             roomListDataVo.setRoomStatus(record.getRoomStatus());
             roomListDataVo.setLookTime(roomTime);
-            roomListDataVo.setLookManCount(record.getRoomViewCount());
-            roomListDataVo.setShareCount(record.getShareCount());
+            roomListDataVo.setLookManCount(roomLives.size());
+            roomListDataVo.setShareCount(shareLogs.size());
             voList.add(roomListDataVo);
         }
         Page<RoomListDataVo> pageVo = new Page<>(pageNum,pageSize);

+ 2 - 0
src/main/java/com/fdkankan/tk/service/IRoomShareLogService.java

@@ -21,4 +21,6 @@ public interface IRoomShareLogService extends IService<RoomShareLog> {
     List<DataCount> getGroupByRoomId();
 
     Long getShareCountByRoomId(String roomId);
+
+    List<RoomShareLog> getByRoomId(String roomId);
 }

+ 7 - 0
src/main/java/com/fdkankan/tk/service/impl/RoomShareLogServiceImpl.java

@@ -52,4 +52,11 @@ public class RoomShareLogServiceImpl extends ServiceImpl<IRoomShareLogMapper, Ro
         wrapper.eq(RoomShareLog::getRoomId,roomId);
         return this.count(wrapper);
     }
+
+    @Override
+    public List<RoomShareLog> getByRoomId(String roomId) {
+        LambdaQueryWrapper<RoomShareLog> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(RoomShareLog::getRoomId,roomId);
+        return this.list(wrapper);
+    }
 }