拍卖行:添加实时推送

This commit is contained in:
luying
2021-10-27 14:14:18 +08:00
parent 639f917a75
commit e4d4af4409
8 changed files with 110 additions and 21 deletions

View File

@@ -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;
}
}