邮件 活跃度下发
This commit is contained in:
@@ -11,6 +11,7 @@ import { BattleRecordModel } from '../db/BattleRecord';
|
||||
import { getArmyBossRank } from '../pubUtils/data';
|
||||
import { getMailContent } from '../services/mailService';
|
||||
import { pushMail } from '../pubUtils/interface';
|
||||
import { MAIL_TYPE } from '../consts';
|
||||
/**
|
||||
*
|
||||
* @param bossInstance
|
||||
@@ -122,12 +123,12 @@ export async function bossResult(code: string, serverId: number, dataName: strin
|
||||
});
|
||||
let mails = new Array<MailType>();
|
||||
let pushMessage = new Array<pushMail>();
|
||||
recordRanks.forEach(async function({roleId, score}, index){
|
||||
recordRanks.forEach(async function({ roleId }, index){
|
||||
let rankLv = index + 1;
|
||||
let goods = getArmyBossRankReward(rankLv);
|
||||
if (!goods || !goods.length)
|
||||
return;
|
||||
await getMailContent(roleId, 1, [JSON.stringify(rankLv)], goods, mails, pushMessage);
|
||||
await getMailContent(roleId, MAIL_TYPE.GUILD_BOSS_REWARD, [JSON.stringify(rankLv)], goods, mails, pushMessage);
|
||||
});
|
||||
await MailModel.addMails(mails);
|
||||
pushMessage.forEach(({route, data, uids })=>{
|
||||
|
||||
Reference in New Issue
Block a user