后台:json上传
This commit is contained in:
@@ -7,6 +7,7 @@ import { STATUS } from '../../../consts/statusCode';
|
||||
import { GMMailModel } from '../../../db/GMMail';
|
||||
import { setGmMails } from '../../../pubUtils/gmData/gmDataUtil';
|
||||
import { getRoleOnlineInfo } from '../../../services/redisService';
|
||||
import { dispatch } from '../../../util/dispatcher';
|
||||
export default function(app: Application) {
|
||||
return new GmHandler(app);
|
||||
}
|
||||
@@ -80,4 +81,45 @@ export class GmHandler {
|
||||
setGmMails([mail]);//更新邮件缓存
|
||||
this.app.rpc.role.roleRemote.sendGmMailsToRoles.toServer('role-server-1',[mail]);//检查是否是群体邮件,并下发群体邮件,非群体邮件通过Filter刷新下发
|
||||
}
|
||||
|
||||
async reloadResource(msg: {}, session: BackendSession) {
|
||||
try {
|
||||
let activityServers = this.app.getServersByType('activity');
|
||||
for(let { id } of activityServers) {
|
||||
await this.app.rpc.activity.activityRemote.reloadResources.toServer(id);
|
||||
}
|
||||
let battleServers = this.app.getServersByType('battle');
|
||||
for(let { id } of battleServers) {
|
||||
await this.app.rpc.battle.battleRemote.reloadResources.toServer(id);
|
||||
}
|
||||
let chatServers = this.app.getServersByType('chat');
|
||||
for(let { id } of chatServers) {
|
||||
await this.app.rpc.chat.chatRemote.reloadResources.toServer(id);
|
||||
}
|
||||
let connectServers = this.app.getServersByType('connector');
|
||||
for(let { id } of connectServers) {
|
||||
await this.app.rpc.connector.connectorRemote.reloadResources.toServer(id);
|
||||
}
|
||||
let guildServers = this.app.getServersByType('guild');
|
||||
for(let { id } of guildServers) {
|
||||
await this.app.rpc.guild.guildRemote.reloadResources.toServer(id);
|
||||
}
|
||||
let roleServers = this.app.getServersByType('role');
|
||||
for(let { id } of roleServers) {
|
||||
await this.app.rpc.role.roleRemote.reloadResources.toServer(id);
|
||||
}
|
||||
let systimerServers = this.app.getServersByType('systimer');
|
||||
for(let { id } of systimerServers) {
|
||||
await this.app.rpc.systimer.systimerRemote.reloadResources.toServer(id);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
isOK: true
|
||||
});
|
||||
} catch(e) {
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
isOK: false,
|
||||
err: e.stack
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user