pvp:修复pvp赛季设置问题

This commit is contained in:
luying
2022-01-13 18:15:57 +08:00
parent cc27f74179
commit afacfb59a1
4 changed files with 23 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import { Application, ChannelService, FrontendSession, RemoterClass, HandlerService, } from 'pinus';
import { PVPConfigType } from '../../../db/SystemConfig';
import { PVPConfigModel, PVPConfigType } from '../../../db/SystemConfig';
import { reloadResources } from '../../../pubUtils/data';
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
import { taflush } from '../../../services/sdkService';
@@ -14,6 +14,7 @@ export class BattleRemote {
constructor(private app: Application) {
this.app = app;
this.channelService = app.get('channelService');
this.initPvpSeasonNum();
}
private channelService: ChannelService;
@@ -90,6 +91,11 @@ export class BattleRemote {
}
}
public async initPvpSeasonNum() {
let pvpConfig = await PVPConfigModel.findCurPVPConfig();
this.setPvpSeasonNum(pvpConfig);
}
public setServerMainten(serverIds: number[], startTime: number, endTime: number) {
setServerMainten(serverIds, startTime, endTime);
}