✨ feat(gvg): 玩家驻扎排行榜

This commit is contained in:
luying
2023-02-17 10:58:45 +08:00
parent 92191cbcca
commit fc2a86ad81
16 changed files with 190 additions and 61 deletions
+4 -2
View File
@@ -16,6 +16,8 @@ import { RoleModel, RoleType } from '../db/Role';
import { GuildType } from '../db/Guild';
import { ActivityGroupModel } from '../db/ActivityGroup';
import { LadderMatchModel, LadderMatchType } from '../db/LadderMatch';
import { GVGServerGroupModel } from '../db/GVGServerGroup';
import { nowSeconds } from '../pubUtils/timeUtil';
/**
* 在服务重新启动时,将信息存入redis
@@ -52,7 +54,7 @@ export async function initAllRank() {
await setRankRedisFromDb(REDIS_KEY.PVP_RANK, {});
for(let {id} of serverList) {
await initRank(id);
await initRankByServerId(id);
await initActivitiesRank(id)
}
}
@@ -62,7 +64,7 @@ export async function initAllRank() {
*
* @param serverId 服务器
*/
export async function initRank(serverId: number) {
export async function initRankByServerId(serverId: number) {
// console.log('*****', 'initRank')
await setRankRedisFromDb(REDIS_KEY.TOWER_RANK, { serverId });
await setRankRedisFromDb(REDIS_KEY.GUILD_ACTIVE_RANK, { serverId });