排行榜: 获取排行榜

This commit is contained in:
luying
2021-04-12 09:47:15 +08:00
parent 34e02dea89
commit 5dca7b304d
32 changed files with 1077 additions and 290 deletions
+3 -3
View File
@@ -115,11 +115,11 @@ export async function matchPlayerByRank(seasonNum: number, oppPlayers: OppPlayer
let r = new Rank(REDIS_KEY.PVP_RANK, {});
let ridRanks = new Array<number>(); // 已经被使用了的排名
for(let { roleId: curRoleId } of oppPlayers) {
let rankLv = await r.getMyRank(robotIdComBack(curRoleId));
let rankLv = await r.getMyRank({ roleId: robotIdComBack(curRoleId)});
ridRanks.push(rankLv);
}
let myRank = await r.getMyRank(roleId);
let myRank = await r.getMyRank({roleId});
ridRanks.push(myRank);
let oppRoleId = '';
@@ -213,7 +213,7 @@ async function generPlayerOppHis(pvpdefense: PvpDefenseType, mapWarJson: DicWarJ
let { heroScores, heroes: defenseHeroes } = pvpdefense;
let role = <RoleType>pvpdefense.role;
let r = new Rank(REDIS_KEY.PVP_RANK, {});
let rankLv = await r.getMyRank(role.roleId);
let rankLv = await r.getMyRank({ roleId: role.roleId });
let dbHeroes = await HeroModel.findByRole(role.roleId, [{field: 'ce', sortBy: -1}]);
let heroes = new Array<PvpEnemies>();
let otherHeroes = new Array<PvpOtherHeroes>(); // 阵容外的所有武将信息