feat(gvg): 排行榜奖励邮件

This commit is contained in:
luying
2023-02-17 10:00:19 +08:00
parent 2eea5d86d9
commit 0804b32db4
9 changed files with 75 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ import { GVGUserDataModel } from "../../../db/GVGUserData";
import { sendMessageToGuildWithSuc, sendMessageToUserWithSuc } from "../../../services/pushService";
import { GVGLeaguePrepareModel } from "../../../db/GVGLeaguePrepare";
import { createGroupMsg, pushGroupMsgToRoom } from "../../../services/chatService";
import { sendMailByContent, sendMailToGuildByContent } from "../../../services/mailService";
import { sendMailByContent, sendMailToGuildByContent, sendMailToLeagueByContent } from "../../../services/mailService";
import { getGVGCities } from "../../../services/gvg/gvgBattleService";
import { guildQuitLeagueRecord } from "../../../services/gvg/gvgRecService";
import { LeagueLeader } from "../../../domain/rank";
@@ -637,9 +637,7 @@ export class GVGManageHandler {
const { guildCodes } = myLeague;
//下发邮件
for(let guildCode of guildCodes) {
await sendMailToGuildByContent(MAIL_TYPE.GUILD_MAIL, guildCode, { sendName: `${roleName}`, params: [content] });
}
await sendMailToLeagueByContent(MAIL_TYPE.GUILD_MAIL, myLeague.leagueCode, { sendName: `${roleName}`, params: [content] }, myLeague);
return resResult(STATUS.SUCCESS, { isSuccess: true });
}