军团:更新排行榜信息

This commit is contained in:
luying
2021-12-27 15:37:51 +08:00
parent dbac289d3e
commit 1324447aca
3 changed files with 18 additions and 5 deletions

View File

@@ -140,7 +140,7 @@ export class GuildHandler {
if (checkNameResult) return resResult(STATUS.GUILD_NAME_DUP);
}
const select = ['code', 'name', 'notice', 'introduce', 'ceLimit', 'isAuto', 'icon'];
const select = ['code', 'name', 'notice', 'introduce', 'ceLimit', 'isAuto', 'icon', '+members'];
let updateInfo: GuildUpdateParam = {};
if(name != undefined) updateInfo.name = name;
if(notice != undefined) updateInfo.notice = notice;
@@ -152,7 +152,12 @@ export class GuildHandler {
let chatSid = await getGuildChannelSid(code);
this.app.rpc.chat.guildRemote.updateInfo.toServer(chatSid, code, { name, notice, introduce, ceLimit, isAuto });
if(name != undefined) await updateUserInfo(REDIS_KEY.GUILD_INFO, code, [{ field: 'name', value: name }]);
if(name != undefined) {
await updateUserInfo(REDIS_KEY.GUILD_INFO, code, [{ field: 'name', value: name }]);
for(let roleId of guild.members) {
await updateUserInfo(REDIS_KEY.USER_INFO, roleId, [{ field: 'guildName', value: name }]);
}
}
if (notice != undefined) {
pushGuildNoticeUpdateMsg(roleId, roleName, guild);
}