优化:抽象推送方法
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { KeyName, KeyNameParam, RankParam, GuildRankParam, RoleRankInfo, GuildLeader, LineupParam, myIdInter, GeneralRankParam, ValueConfig, GuildRankInfo, RoleAndGuildRankInfo } from "../domain/rank";
|
||||
import { getInfoKeyByRedisKey, ROLE_SELECT, GUILD_SELECT, REDIS_KEY, HERO_SELECT, COMPOSE_FIELD_TYPE, KEY_TO_COMPOSE_FIELD, getRedisKeyByRankType, COUNTER, RANK_TYPE } from "../consts";
|
||||
import { getInfoKeyByRedisKey, ROLE_SELECT, GUILD_SELECT, REDIS_KEY, HERO_SELECT, COMPOSE_FIELD_TYPE, KEY_TO_COMPOSE_FIELD, getRedisKeyByRankType, COUNTER, RANK_TYPE, PUSH_ROUTE } from "../consts";
|
||||
import { redisClient, delKeys } from "./redisService";
|
||||
import { RoleType, RoleModel } from "../db/Role";
|
||||
import { GuildType, GuildModel } from "../db/Guild";
|
||||
@@ -15,6 +15,7 @@ import { getRandSingleEelm } from "../pubUtils/util";
|
||||
import { RANK_FIRST_REWARD_STATUS } from '../consts';
|
||||
import { CounterModel } from "../db/Counter";
|
||||
import { ActivityTimeLimitRankModel } from "../db/ActivityTimeLimitRank";
|
||||
import { sendMessageToServerWithSuc } from "./pushService";
|
||||
|
||||
|
||||
/**
|
||||
@@ -925,14 +926,13 @@ export class Rank {
|
||||
}
|
||||
}
|
||||
if(rankFirstRecs.length > 0) {
|
||||
pinus.app.rpc.chat.chatRemote.sendRankTopUpdated.toServer(sid, serverId, rankFirstRecs);
|
||||
await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.RANK_TOP_UPDATE, { ranks: rankFirstRecs }, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 从数据库内获取排行榜存入redis
|
||||
* @param type 排行榜类型
|
||||
|
||||
Reference in New Issue
Block a user