|
@@ -57,7 +57,10 @@ public class DataCountService {
|
|
|
if(roomIds.size() >0){
|
|
|
wrapper3.in(RoomShareLog::getRoomId,roomIds);
|
|
|
}
|
|
|
- Long shareCount = roomShareLogService.count(wrapper3);
|
|
|
+ Integer shareCount = 0 ;
|
|
|
+ for (Room room : roomList) {
|
|
|
+ shareCount += room.getShareCount();
|
|
|
+ }
|
|
|
|
|
|
RoomData roomData = new RoomData();
|
|
|
roomData.setRoomCount(roomCount);
|
|
@@ -221,10 +224,6 @@ public class DataCountService {
|
|
|
HashMap<String,Long> roomManMap = new HashMap<>();
|
|
|
roomList.forEach(entity -> roomManMap.put(entity.getDataKey(),entity.getDataCount()));
|
|
|
|
|
|
- List<DataCount> roomShareList = roomShareLogService.getGroupByRoomId();
|
|
|
- HashMap<String,Long> roomShareMap = new HashMap<>();
|
|
|
- roomShareList.forEach(entity -> roomShareMap.put(entity.getDataKey(),entity.getDataCount()));
|
|
|
-
|
|
|
for (Room record : page.getRecords()) {
|
|
|
List<RoomNum> roomNums = numRoomMap.get(record.getRoomId());
|
|
|
List<String> sceneTileList = new ArrayList<>();
|
|
@@ -252,7 +251,7 @@ public class DataCountService {
|
|
|
roomListDataVo.setRoomStatus(record.getRoomStatus());
|
|
|
roomListDataVo.setLookTime(minute);
|
|
|
roomListDataVo.setLookManCount(roomManMap.get(record.getRoomId()) == null ? 0L:roomManMap.get(record.getRoomId()) );
|
|
|
- roomListDataVo.setShareCount(roomShareMap.get(record.getRoomId()) == null ? 0L:roomShareMap.get(record.getRoomId()) );
|
|
|
+ roomListDataVo.setShareCount(record.getShareCount());
|
|
|
voList.add(roomListDataVo);
|
|
|
}
|
|
|
Page<RoomListDataVo> pageVo = new Page<>(pageNum,pageSize);
|
|
@@ -282,7 +281,7 @@ public class DataCountService {
|
|
|
|
|
|
Page<UserMsgVo> page = roomDanmakuService.pageList(new Page<>(pageNum,pageSize) ,roomIds,startTime,endTime);
|
|
|
Set<String> roomIdsVo = page.getRecords().stream().map(UserMsgVo::getRoomId).collect(Collectors.toSet());
|
|
|
- HashMap<String, Room> roomHashMap = roomService.getByIds(roomIdsDb);
|
|
|
+ HashMap<String, Room> roomHashMap = roomService.getByIds(roomIdsVo);
|
|
|
|
|
|
HashMap<String,List<RoomVisitLog>> roomVisitLogsMap = new HashMap<>();
|
|
|
HashMap<String,List<RoomDanmaku>> danmakusMap = new HashMap<>();
|