✨ 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
+3 -2
View File
@@ -16,6 +16,7 @@ import { ActivityTimeLimitRankModel } from "../db/ActivityTimeLimitRank";
import { sendMessageToServerWithSuc } from "./pushService";
import { LadderMatchModel } from "../db/LadderMatch";
import { completeRanks } from "./ladderService";
import { GVGVestigeRankModel } from "../db/GVGVestigeRank";
/**
@@ -757,7 +758,7 @@ export class Rank {
let param: RoleRankInfo | GuildRankInfo;
if (this.infoKey == REDIS_KEY.USER_INFO) {
if (this.key != REDIS_KEY.LADDER && nowSeconds() - userInfo.updatedAt > 2 * 30 * 24 * 60 * 60) {
if (this.key != REDIS_KEY.LADDER && this.key != REDIS_KEY.GVG_VESTIGE_MEMBER && nowSeconds() - userInfo.updatedAt > 2 * 30 * 24 * 60 * 60) {
return null;
}
param = new RoleRankInfo(userInfo);
@@ -992,7 +993,7 @@ async function setRankFirst(rankFirstRec: RankFirstType) {
* @param type 排行榜类型
* @param serverId 分服
*/
export async function setRankRedisFromDb(type: string, args?: { serverId?: number }) {
export async function setRankRedisFromDb(type: string, args?: { serverId?: number, groupId?: number }) {
if (type == REDIS_KEY.TOWER_RANK) {
let serverId = args.serverId;
let ranks = await RoleModel.getRank('tower', serverId, ROLE_SELECT.RANK);