聊天:军团修改公告的推送和测试
This commit is contained in:
@@ -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 });
|
||||
|
||||
}
|
||||
|
||||
// 游客查看军团详细信息
|
||||
|
||||
Reference in New Issue
Block a user