拍卖行:添加实时推送
This commit is contained in:
@@ -12,7 +12,7 @@ import { participants } from './guildActivityService';
|
||||
import { Member } from '../domain/battleField/guildActivity';
|
||||
import * as dicParam from '../pubUtils/dicParam';
|
||||
import { RewardInter } from '../pubUtils/interface';
|
||||
import { pushCurrentTime } from './chatService';
|
||||
import { getGuildAuctionChannelSid, getWorldAuctionChannelSid, pushCurrentTime } from './chatService';
|
||||
|
||||
// ! 获取底价,假数据
|
||||
export function getBasePrice(gid: number, count: number) {
|
||||
@@ -385,7 +385,7 @@ export async function sendUngotDividend(debug = false) {
|
||||
|
||||
for (let [roleId, count] of rewards) {
|
||||
// TODO: 邮件类型修改
|
||||
await sendMailByContent(MAIL_TYPE.GUILD_BOSS_REWARD, roleId, {
|
||||
await sendMailByContent(MAIL_TYPE.GUILD_DIVIDEND, roleId, {
|
||||
params: [JSON.stringify(count)],
|
||||
goods: [{ id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.GOLD), count }]
|
||||
});
|
||||
@@ -414,4 +414,14 @@ export async function getAuction(guildCode: string, session: FrontendOrBackendSe
|
||||
dividends = await DividendModel.findGuildDividendsByBegin(guildCode, begin);
|
||||
}
|
||||
return { lots, dividends };
|
||||
}
|
||||
|
||||
export async function pushAuctionOver(lot: LotType) {
|
||||
if(lot.auctionStage == AUCTION_STAGE.GUILD) {
|
||||
let chatSid = await getGuildAuctionChannelSid(lot.guildCode);
|
||||
pinus.app.rpc.chat.chatRemote.sendGuildAuction.toServer(chatSid, lot.guildCode, lot);
|
||||
} else if (lot.auctionStage == AUCTION_STAGE.WORLD) {
|
||||
let chatSid = await getWorldAuctionChannelSid(lot.serverId);
|
||||
pinus.app.rpc.chat.chatRemote.sendWorldAuction.toServer(chatSid, lot.serverId, lot);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user