排行榜: 获取排行榜
This commit is contained in:
@@ -175,9 +175,8 @@ export async function addActive(roleId: string, serverId: number, id: number, ty
|
||||
guild = await GuildModel.updateInfo(guildCode, { activeUpdateTime: nowSeconds() }, { activeDaily: active, activeWeekly: active });
|
||||
|
||||
// 排行榜更新
|
||||
let leader = await RoleModel.findById(guild.leader);
|
||||
let r = new Rank(REDIS_KEY.GUILD_ACTIVE_RANK, { serverId });
|
||||
await r.setRankWithGuildInfo(guildCode, guild.activeWeekly, guild.activeUpdateTime * 1000, guild);
|
||||
await r.setRankWithGuildInfo(guildCode, guild.activeWeekly, guild.activeUpdateTime, guild);
|
||||
pinus.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, guildCode, { activeDaily: guild.activeDaily, activeWeekly: guild.activeWeekly });
|
||||
return { status: 1, guild, userGuild };
|
||||
}
|
||||
@@ -267,7 +266,7 @@ export async function settleGuildWeekly() {
|
||||
|
||||
// 转换周活跃奖励
|
||||
let r = new Rank(REDIS_KEY.GUILD_ACTIVE_RANK, { serverId });
|
||||
let rank = await r.getMyRank(code);
|
||||
let rank = await r.getMyRank({guildCode: code});
|
||||
let allWeeklyReward = getGuildActiveWeekReward(rank);
|
||||
for(let [roleId, job] of members) {
|
||||
let jobActiveRatio = gameData.guildPosition.get(job).activeRatio;
|
||||
|
||||
Reference in New Issue
Block a user