家族榜单排名处理
This commit is contained in:
parent
ef3ff35b91
commit
987b51d00e
@ -45,7 +45,21 @@ public class FamilyMemberTop100Exe {
|
||||
|
||||
List<FamilyMemberTotalExp> top200Exp = getTop200TotalExp(member.getFamilyId());
|
||||
if (CollectionUtils.isEmpty(top200Exp)) {
|
||||
return new FamilyLeaderboardCO();
|
||||
FamilyLeaderboardCO leaderboardCO = new FamilyLeaderboardCO();
|
||||
|
||||
Map<Long, UserProfile> userProfileMap = userProfileGateway.mapByUserIds(Set.of(cmd.getReqUserId()));
|
||||
Set<Long> hostUserIds = getHostUserIds(Set.of(cmd.getReqUserId()));
|
||||
FamilyMemberRankInfoCO myRankInfo = buildMyRankInfo(
|
||||
cmd.getReqUserId(),
|
||||
new FamilyMemberTotalExp().setExp(0L),
|
||||
userProfileMap.get(cmd.getReqUserId()),
|
||||
0,
|
||||
0,
|
||||
hostUserIds.contains(cmd.getReqUserId())
|
||||
);
|
||||
|
||||
leaderboardCO.setMyRankInfo(myRankInfo);
|
||||
return leaderboardCO;
|
||||
}
|
||||
|
||||
Set<Long> userIds = top200Exp.stream()
|
||||
@ -150,9 +164,9 @@ public class FamilyMemberTop100Exe {
|
||||
) {
|
||||
String rank;
|
||||
if (isHost) {
|
||||
rank = myRankInHost > 0 ? (myRankInHost > 100 ? "100+" : String.valueOf(myRankInHost)) : "100+";
|
||||
rank = myRankInHost > 0 ? (myRankInHost > 100 ? "100+" : String.valueOf(myRankInHost)) : "0";
|
||||
} else {
|
||||
rank = myRankInSupporter > 0 ? (myRankInSupporter > 100 ? "100+" : String.valueOf(myRankInSupporter)) : "100+";
|
||||
rank = myRankInSupporter > 0 ? (myRankInSupporter > 100 ? "100+" : String.valueOf(myRankInSupporter)) : "0";
|
||||
}
|
||||
|
||||
return new FamilyMemberRankInfoCO()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user