军团:更新排行榜信息
This commit is contained in:
@@ -78,7 +78,7 @@ export class GmRoleHandler {
|
||||
let params = new GuildFormParam(msg);
|
||||
if(!params.checkParams()) return resResult(STATUS.WRONG_PARMS);
|
||||
|
||||
let guild = await GuildModel.findByCode(params.code);
|
||||
let guild = await GuildModel.findByCode(params.code, null, '+members');
|
||||
let structure = guild.structure||[];
|
||||
|
||||
let updateParams: GuildUpdateParam = { code: params.code };
|
||||
@@ -118,7 +118,12 @@ export class GmRoleHandler {
|
||||
// 设置玩家名
|
||||
if(updateParams.name != undefined || updateParams.lv != undefined) {
|
||||
let arr = [];
|
||||
if(updateParams.name != undefined) arr.push({ field: 'name', value: updateParams.name });
|
||||
if(updateParams.name != undefined) {
|
||||
arr.push({ field: 'name', value: updateParams.name });
|
||||
for(let roleId of guild.members) {
|
||||
await updateUserInfo(REDIS_KEY.USER_INFO, roleId, [{ field: 'guildName', value: updateParams.name }]);
|
||||
}
|
||||
}
|
||||
if(updateParams.lv != undefined) arr.push({ field: 'lv', value: updateParams.lv });
|
||||
await updateUserInfo(REDIS_KEY.GUILD_INFO, params.code, arr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user