拍卖行:添加实时推送
This commit is contained in:
@@ -11,6 +11,7 @@ import { GeneralRankParam } from '../../../domain/rank';
|
||||
import { getAllGuildActivityStatus } from '../../../services/guildActivityService';
|
||||
import { MailParam } from '../../../domain/roleField/mail';
|
||||
import { RankFirstType } from '../../../db/RankFirst';
|
||||
import { LotType } from '../../../db/Lot';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -252,4 +253,26 @@ export class ChatRemote {
|
||||
channel.pushMessage('onPushCurrentTime', resResult(STATUS.SUCCESS, { time }));
|
||||
return { result: true, serverId };
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 实时推送军团拍卖出价
|
||||
* @param guildCode
|
||||
*/
|
||||
public async sendGuildAuction(guildCode: string, lot: LotType) {
|
||||
let roomId = groupRoomId(CHANNEL_PREFIX.GUILD_AUCTION, guildCode);
|
||||
let channel = this.channelService.getChannel(roomId, false);
|
||||
if(!channel) return false;
|
||||
|
||||
channel.pushMessage('onAuctionOver', resResult(STATUS.SUCCESS, { lot }));
|
||||
return true;
|
||||
}
|
||||
|
||||
public async sendWorldAuction(serverId: number, lot: LotType) {
|
||||
let roomId = groupRoomId(CHANNEL_PREFIX.WORLD_AUCTION, serverId);
|
||||
let channel = this.channelService.getChannel(roomId, false);
|
||||
if(!channel) return false;
|
||||
|
||||
channel.pushMessage('onAuctionOver', resResult(STATUS.SUCCESS, { lot }));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user