|
@@ -49,14 +49,8 @@ public class DataCountService {
|
|
|
|
|
|
Long visitManCount = roomVisitLogService.manCount(roomIds);
|
|
|
|
|
|
- Integer shareCount = 0 ;
|
|
|
- for (Room room : roomList) {
|
|
|
- shareCount += room.getShareCount();
|
|
|
- }
|
|
|
- Integer visitCount = 0 ;
|
|
|
- for (Room room : roomList) {
|
|
|
- visitCount += room.getRoomViewCount();
|
|
|
- }
|
|
|
+ Long visitCount = roomVisitLogService.getCountByRoomIds(roomIds);
|
|
|
+ Long shareCount = roomShareLogService.getCountByRoomIds(roomIds);
|
|
|
|
|
|
RoomData roomData = new RoomData();
|
|
|
roomData.setRoomCount(roomCount);
|
|
@@ -232,17 +226,19 @@ public class DataCountService {
|
|
|
});
|
|
|
}
|
|
|
List<RoomVisitLog> roomLives = roomVisitLogService.getByRoomId(record.getRoomId());
|
|
|
- List<RoomShareLog> shareLogs = roomShareLogService.getByRoomId(record.getRoomId());
|
|
|
Long roomTime = getRoomTime(roomLives);
|
|
|
|
|
|
+ Long visitCount = roomVisitLogService.getCountByRoomIds(Arrays.asList(record.getRoomId()));
|
|
|
+ Long shareCount = roomShareLogService.getCountByRoomIds(Arrays.asList(record.getRoomId()));
|
|
|
+
|
|
|
RoomListDataVo roomListDataVo = new RoomListDataVo();
|
|
|
roomListDataVo.setRoomTitle(record.getRoomTitle());
|
|
|
roomListDataVo.setSceneNameList(sceneTileList);
|
|
|
roomListDataVo.setCreateTime(record.getCreateTime());
|
|
|
roomListDataVo.setRoomStatus(record.getRoomStatus());
|
|
|
roomListDataVo.setLookTime(roomTime);
|
|
|
- roomListDataVo.setLookManCount(roomLives.size());
|
|
|
- roomListDataVo.setShareCount(shareLogs.size());
|
|
|
+ roomListDataVo.setLookManCount(visitCount);
|
|
|
+ roomListDataVo.setShareCount(shareCount);
|
|
|
voList.add(roomListDataVo);
|
|
|
}
|
|
|
Page<RoomListDataVo> pageVo = new Page<>(pageNum,pageSize);
|