聊天:军团修改公告的推送和测试

This commit is contained in:
liangtongchuan
2021-03-09 17:02:23 +08:00
parent 109d643544
commit 130bbc3be6
4 changed files with 60 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ import { openGuildRefine } from '../../../services/guildRefineService';
import { unlockTrain } from '../../../services/guildTrainService';
import { removeBossRank } from '../../../services/guildBossService';
import { removeTrainRank } from '../../../services/guildTrainService';
import { pushGuildNoticeUpdateMsg } from '../../../services/chatService';
export default function (app: Application) {
return new GuildHandler(app);
}
@@ -118,6 +119,7 @@ export class GuildHandler {
async setGuildInfo(msg: { code: string, name: string, notice: string, introduce: string, ceLimit: number, isAuto: boolean }, session: BackendSession) {
const roleId = session.get('roleId');
const roleName = session.get('roleName');
const { code, name, notice, introduce, ceLimit, isAuto } = msg;
if(!name) return resResult(STATUS.WRONG_PARMS);
@@ -129,9 +131,11 @@ export class GuildHandler {
this.app.rpc.chat.guildRemote.updateInfo.toServer(CHAT_SERVER, code, { name, notice, introduce, ceLimit, isAuto });
await redisUserInfoUpdate(REDIS_KEY.GUILD_INFO, code, [{ field: 'name', value: name }]);
if (notice) {
pushGuildNoticeUpdateMsg(roleId, roleName, guild);
}
// 返回
return resResult(STATUS.SUCCESS, { ...guild });
}
// 游客查看军团详细信息