✨ feat(排行榜): pvp排行榜添加区服名
This commit is contained in:
@@ -24,6 +24,8 @@ import { getSeconds, nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
import { PlayerDetail, PlayerDetailHero } from '../../../domain/battleField/guild';
|
||||
import { PvpSaveDataModel } from '../../../db/PvpSaveData';
|
||||
import { PVPConfigModel } from '../../../db/PvpConfig';
|
||||
import { getAllServerName } from '../../../services/redisService';
|
||||
import { RoleRankInfo } from '../../../domain/rank';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -474,7 +476,13 @@ export class PvpHandler {
|
||||
if(checkPvpSeasonIsWaiting()) { // 休赛期
|
||||
seasonNum ++;
|
||||
}
|
||||
|
||||
let serverNames = await getAllServerName();
|
||||
let r = new Rank(REDIS_KEY.PVP_RANK, { seasonNum });
|
||||
r.setGenerFieldsFun(function (param: RoleRankInfo) {
|
||||
let { serverId } = param;
|
||||
return { ...param, serverName: serverNames[serverId]||'无' };
|
||||
});
|
||||
let { ranks, myRank } = await r.getRankListWithMyRank({ roleId });
|
||||
|
||||
if (!myRank) {
|
||||
|
||||
Reference in New Issue
Block a user