系统:停服维护逻辑

This commit is contained in:
luying
2021-07-15 14:40:26 +08:00
parent 352aecfb56
commit 0028c9b992
26 changed files with 348 additions and 50 deletions
@@ -239,4 +239,17 @@ export class ChatRemote {
if (!channel) return;
channel.pushMessage(path, resResult(STATUS.SUCCESS, data));
}
/**
* @description 全服推送维护
* @param serverId
*/
public async sendServerMaintenance(serverId: number) {
let roomId = groupRoomId(CHANNEL_PREFIX.WORLD, serverId);
let channel = this.channelService.getChannel(roomId, false);
if (!channel) return { result: false, serverId };
channel.pushMessage('onServerMaintenance', resResult(STATUS.SERVER_MAINTENANCE));
return { result: true, serverId };
}
}