公会统计添加负责人fixed
This commit is contained in:
@@ -205,6 +205,7 @@ public class WeekGuildStatService {
|
||||
List<WeekActiveGuildStat> detailList = activeGuildPartitionMap.get(partitionId);
|
||||
|
||||
Map<Integer, Long> ownerUidMap = new HashMap<>();
|
||||
Map<Integer, Integer> operatorIdMap = new HashMap<>();
|
||||
|
||||
List<Integer> guildIdList = detailList.stream().map(WeekActiveGuildStat::getGuildId).distinct().toList();
|
||||
if (!CollectionUtils.isEmpty(guildIdList)){
|
||||
@@ -223,10 +224,11 @@ public class WeekGuildStatService {
|
||||
List<Guild> guildList = guildService.listByIds(guildIdList);
|
||||
guildList.forEach(guild->{
|
||||
ownerUidMap.put(guild.getId(), guild.getOwnerUid());
|
||||
operatorIdMap.put(guild.getId(), guild.getOperatorId());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<Integer, String> guildOperatorMap = guildOperatorService.operatorNameMap(partitionId);
|
||||
Map<Long, Users> ownerUserMap = usersService.getUsersMapByUids(ownerUidMap.values().stream().toList());
|
||||
|
||||
Map<Integer, String> regionNameMap = regionInfoService.getRegionName();
|
||||
@@ -242,6 +244,11 @@ public class WeekGuildStatService {
|
||||
item.setOwnerErbanNo(ownerUser.getErbanNo());
|
||||
}
|
||||
}
|
||||
Integer operatorId = operatorIdMap.getOrDefault(item.getGuildId(), null);
|
||||
if (operatorId != null) {
|
||||
item.setOperatorId(operatorId);
|
||||
item.setOperatorName(guildOperatorMap.getOrDefault(item.getOperatorId(), ""));
|
||||
}
|
||||
}).sorted(Comparator.comparing(WeekActiveGuildStat::getGuildDiamondFlow).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user