拍卖行:修改拍卖行地址
This commit is contained in:
@@ -242,4 +242,14 @@ export class ChatRemote {
|
||||
channel.pushMessage('onServerMaintenance', resResult(STATUS.SERVER_MAINTENANCE));
|
||||
return { result: true, serverId };
|
||||
}
|
||||
|
||||
public async pushCurrentTime(serverId: number, time: number) {
|
||||
let roomId = groupRoomId(CHANNEL_PREFIX.WORLD, serverId);
|
||||
let channel = this.channelService.getChannel(roomId, false);
|
||||
console.log('*********', roomId, channel);
|
||||
if (!channel) return { result: false, serverId };
|
||||
|
||||
channel.pushMessage('onPushCurrentTime', resResult(STATUS.SUCCESS, { time }));
|
||||
return { result: true, serverId };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,4 +334,8 @@ export class GmHandler {
|
||||
}
|
||||
return resResult(STATUS.SUCCESS)
|
||||
}
|
||||
|
||||
async setGuildActivityDebug(msg: { startActivity: number, }, session: BackendSession) {
|
||||
// 1. 将军团活动的时间设置到
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DividendModel } from './../../../db/Dividend';
|
||||
import { Application, BackendSession, ChannelService, HandlerService, } from "pinus";
|
||||
import { AUCTION_STAGE, DEBUG_MAGIC_WORD, STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, DATA_NAME, LOT_STATUS } from "../../../consts";
|
||||
import { Application, BackendSession, ChannelService, HandlerService, pinus, } from "pinus";
|
||||
import { AUCTION_STAGE, DEBUG_MAGIC_WORD, STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, DATA_NAME, LOT_STATUS, CHANNEL_PREFIX } from "../../../consts";
|
||||
import { LotModel } from "../../../db/Lot";
|
||||
import { ItemReward } from "../../../domain/dbGeneral";
|
||||
import { resResult } from "../../../pubUtils/util";
|
||||
@@ -17,6 +17,7 @@ import { UserGuildModel } from '../../../db/UserGuild';
|
||||
import { UserGuildApplyModel } from '../../../db/UserGuildApply';
|
||||
import * as dicParam from '../../../pubUtils/dicParam';
|
||||
import { getAuctionRewardByPoolId } from '../../../pubUtils/data';
|
||||
import { channelServer, groupRoomId } from '../../../services/chatService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -305,4 +306,18 @@ export class AuctionHandler {
|
||||
}
|
||||
return resResult(STATUS.INTERNAL_ERR);
|
||||
}
|
||||
|
||||
async debugSetPlayTime(msg: { magicWord: string, time: string }, session: BackendSession) {
|
||||
const { magicWord, time } = msg;
|
||||
if (magicWord !== DEBUG_MAGIC_WORD) {
|
||||
return resResult(STATUS.TOKEN_ERR);
|
||||
}
|
||||
|
||||
let serverId = session.get('serverId');
|
||||
let roomId = groupRoomId(CHANNEL_PREFIX.WORLD, serverId);
|
||||
const channelSid = await channelServer(roomId);
|
||||
await pinus.app.rpc.chat.chatRemote.pushCurrentTime.toServer(channelSid, serverId, new Date(time).getTime());
|
||||
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { nowSeconds } from "../pubUtils/timeUtil";
|
||||
import { refDailyTask, refDailyTaskBox } from './taskService'
|
||||
// import { EVENT_STATUS, FUNCS_ID } from "../consts";
|
||||
// import { startEvent } from "./eventSercive";
|
||||
import * as dicParam from '../pubUtils/dicParam';
|
||||
|
||||
/**
|
||||
* 刷新
|
||||
@@ -16,7 +17,7 @@ export async function refresh(session: FrontendOrBackendSession) {
|
||||
const sid = session.get('sid');
|
||||
|
||||
let uids = [{uid: roleId, sid}];
|
||||
pinus.app.get('channelService').pushMessageByUids('onPushCurrentTime', resResult(STATUS.SUCCESS, {time: Date.now()}), uids);
|
||||
if(dicParam.SERVER_DEBUG_MODE.CURRENT_TIME != 1) pinus.app.get('channelService').pushMessageByUids('onPushCurrentTime', resResult(STATUS.SUCCESS, {time: Date.now()}), uids);
|
||||
await refreshDaily(session);
|
||||
// await startEvent(session);
|
||||
}
|
||||
|
||||
@@ -227,3 +227,6 @@ export const NAMEPLATE = {
|
||||
export const GK_MAINELITE = {
|
||||
GKMAINELITE_OPEN_CONDITION: 424, // 梦魇模式开启时间:通过某关卡id
|
||||
};
|
||||
export const SERVER_DEBUG_MODE = {
|
||||
CURRENT_TIME: 1, // 是否是debug模式
|
||||
}
|
||||
Reference in New Issue
Block a user