✨ feat(线上维护): json线上更新方案
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { ActivityModel, ActivityModelType } from '../../../db/Activity';
|
||||
import { ServerlistModel } from '../../../db/Serverlist';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
import { ActivityInRemote } from '../../../domain/activityField/activityField';
|
||||
@@ -13,6 +13,7 @@ import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setKvToMemory } from '../../../services/pushService';
|
||||
import { sendPublicAccountGift } from '../../../services/activity/bindPhoneService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -31,9 +32,26 @@ export class ActivityRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
@@ -183,4 +201,12 @@ export class ActivityRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { setApiIsClose } from '../../../services/chatService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { setServerGroup } from '../../../services/serverService';
|
||||
@@ -11,6 +11,7 @@ import { taflush } from '../../../services/sdkService';
|
||||
import { setPvpSeasonNum, setPvpSettleSeasonNum } from '../../../services/timeTaskService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -86,14 +87,30 @@ export class BattleRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setPvpSettleSeasonNum(pvpConfig: PVPConfigType) {
|
||||
try {
|
||||
@@ -190,4 +207,12 @@ export class BattleRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { _checkFilterWords, taflush } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
@@ -7,6 +7,7 @@ import { addUserToChannel, sendMessageToChannel, sendMessgeToChannelByBatch, set
|
||||
import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setServerGroup } from '../../../services/serverService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -103,9 +104,26 @@ export class ChatRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
@@ -182,4 +200,12 @@ export class ChatRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import { setKvToMemory } from '../../../services/pushService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -109,11 +110,36 @@ export class ComBattleRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Application, HandlerService, } from 'pinus';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { UserGuildType } from '../../../db/UserGuild';
|
||||
import { incServerNum, kickUser } from '../../../services/connectorService';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||
@@ -14,6 +14,7 @@ import { setPvpSeasonNum, setPvpSettleSeasonNum } from '../../../services/timeTa
|
||||
import { setKvToMemory } from '../../../services/pushService';
|
||||
import { setServerGroup } from '../../../services/serverService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -75,9 +76,26 @@ export class ConnectorRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
@@ -211,4 +229,12 @@ export class ConnectorRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { setServerGroup } from '../../../services/serverService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -44,5 +46,40 @@ export class GMRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { taflush, treatGuildName } from '../../../services/sdkService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
@@ -13,6 +13,7 @@ import { updateLeagueNameMem, updateTeamRoleInfoMem } from '../../../services/gv
|
||||
import { resetPeriodTime, setPeriodTime } from '../../../services/gvg/gvgFightService';
|
||||
import { setServerGroup } from '../../../services/serverService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -28,9 +29,26 @@ export class GuildRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
@@ -211,4 +229,12 @@ export class GuildRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { refundOrderFromRedisPub, settleOrderFromRedisPub } from '../../../services/orderService';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
@@ -7,6 +7,7 @@ import { errlogger } from '../../../util/logger';
|
||||
import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setKvToMemory } from '../../../services/pushService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -25,14 +26,31 @@ export class OrderRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async settleOrderFromRedisPub(message: string) {
|
||||
try {
|
||||
await settleOrderFromRedisPub(message);
|
||||
@@ -104,4 +122,12 @@ export class OrderRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Application, ChannelService, HandlerService, } from 'pinus';
|
||||
// import { sendRolesMails } from '../../../services/mailService';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { RankFirstModel, RankFirstType } from '../../../db/RankFirst';
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/PvpConfig';
|
||||
import { treatRoleName, taflush, sendSurveyMail, sendGiftCodeMail } from '../../../services/sdkService';
|
||||
@@ -14,6 +14,7 @@ import { DEBUG_MAGIC_WORD, MAIL_TYPE } from '../../../consts';
|
||||
import { ActivityTimeLimitRankModel } from '../../../db/ActivityTimeLimitRank';
|
||||
import { RoleModel } from '../../../db/Role';
|
||||
import { sendMailToManyPlayerByContent } from '../../../services/mailService';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -67,14 +68,30 @@ export class RoleRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setPvpSeasonNum(pvpConfig: PVPConfigType) {
|
||||
try {
|
||||
@@ -197,4 +214,12 @@ export class RoleRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Application, ChannelService } from 'pinus';
|
||||
import { guildActivityStart, gateActivityEnd, cityActivityEnd, raceActivityEnd, guildActivitySchedule, auctionSchedule, initMaintenance, stopMaintenance, addMailsToSchedule, updateTimeLimitRank, setLadderCountDown, cancelLadderCountDown, initSumSchedule, setPvpSeasonSchedule, initGVGConfigSchedule, gvgBattleStartSchedule, gvgBattleEndSchedule } from '../../../services/timeTaskService';
|
||||
import PvpDefenseType from '../../../db/PvpDefense';
|
||||
import { DicGuildActivity } from '../../../pubUtils/dictionary/DicGuildActivity';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { gameData, reloadResources } from '../../../pubUtils/data';
|
||||
import { setMarquee, cancelMarquee } from '../../../services/gmService';
|
||||
import { setDicAuctionTime, setDicGuildActivity } from '../../../services/guildActivity/guildActivityService';
|
||||
import { setWeek } from '../../../pubUtils/timeUtil';
|
||||
@@ -20,6 +20,7 @@ import { setApiIsClose } from '../../../services/chatService';
|
||||
import { setKvToMemory } from '../../../services/pushService';
|
||||
import { setServerGroup } from '../../../services/serverService';
|
||||
import { setHiddenData } from '../../../services/memoryCache/hiddenData';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
|
||||
export default function (app: Application) {
|
||||
return new SystimerRemote(app);
|
||||
@@ -68,9 +69,26 @@ export class SystimerRemote {
|
||||
/**
|
||||
* 重载json资源
|
||||
*/
|
||||
public async reloadResources() {
|
||||
public async reloadResources(type?: string) {
|
||||
try {
|
||||
reloadResources();
|
||||
reloadResources(type);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setDicParam(field1: string, field2: string, value: string|number) {
|
||||
try {
|
||||
if(dicParam[field1] && dicParam[field1][field2]) dicParam[field1][field2] = value;
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async setGameDataToApp() {
|
||||
try {
|
||||
this.app.set('gameData', gameData);
|
||||
this.app.set('dicParam', dicParam);
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
@@ -275,4 +293,12 @@ export class SystimerRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public async fun() {
|
||||
try {
|
||||
console.log('预留一个函数,用于之后线上维护时需要使用');
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user