✨ feat(gvg): 排行榜奖励邮件
This commit is contained in:
@@ -142,4 +142,10 @@ export enum GVG_AREA_TYPE {
|
||||
CATAPULT = 6, // 6-投石车区
|
||||
}
|
||||
|
||||
export const GVG_CATAPULT = 'catapult';
|
||||
export const GVG_CATAPULT = 'catapult';
|
||||
|
||||
export enum GVG_BATTLE_RANK_TYPE {
|
||||
PLAYER = 1,
|
||||
GUILD = 2, // 废弃
|
||||
LEAGUE = 3
|
||||
}
|
||||
@@ -66,6 +66,8 @@ export enum MAIL_TYPE {
|
||||
LEAGUE_KICK = 36, // 被踢出联军
|
||||
LEAGUE_ABDICATE = 37, // 被任命盟主
|
||||
HELP_HARVEST = 38, // 帮收
|
||||
GVG_BATTLE_LEAGUE_RANK_REWARD = 39, // 激战期联军排行榜奖励
|
||||
GVG_BATTLE_PLAYER_RANK_REWARD = 40, // 激战期个人排行榜奖励
|
||||
};
|
||||
|
||||
export const SEND_NAME = '系统';
|
||||
|
||||
@@ -100,13 +100,19 @@ export default class GVGLeague extends BaseModel {
|
||||
return league
|
||||
}
|
||||
|
||||
public static async findByCode(leagueCode: string) {
|
||||
public static async findByCode(leagueCode: string, select = '') {
|
||||
const league: GVGLeagueType = await GVGLeagueModel.findOne({ leagueCode, status: 1 })
|
||||
.populate('leader', { roleId: 1, roleName: 1, head: 1, frame: 1, spine: 1, lv: 1, quitTime: 1, ce: 1, title: 1, serverId: 1, _id: 0 }, 'Role')
|
||||
.select(select)
|
||||
.lean();
|
||||
return league
|
||||
}
|
||||
|
||||
public static async findByCodeWithoutPopulate(leagueCode: string, select = '') {
|
||||
const league: GVGLeagueType = await GVGLeagueModel.findOne({ leagueCode, status: 1 }).select(select).lean();
|
||||
return league
|
||||
}
|
||||
|
||||
public static async findByCodes(leagueCodes: string[]) {
|
||||
const leagues: GVGLeagueType[] = await GVGLeagueModel.find({ leagueCode: { $in: leagueCodes }, status: 1 })
|
||||
.populate('leader', { roleId: 1, roleName: 1, head: 1, frame: 1, spine: 1, lv: 1, quitTime: 1, ce: 1, title: 1, serverId: 1, guildName: 1, _id: 0 }, 'Role')
|
||||
|
||||
@@ -23,6 +23,8 @@ export default class GroupMail extends MailTemp {
|
||||
@prop({ required: false })
|
||||
guildCode: string;
|
||||
|
||||
@prop({ required: false })
|
||||
leagueCode: string;
|
||||
/**
|
||||
* @description 根据玩家id获得所有有效邮件
|
||||
* @param {String} roleId 玩家id
|
||||
|
||||
@@ -271,5 +271,19 @@
|
||||
"sendName": "您忠诚的小跟班",
|
||||
"content": "亲爱的主公,联军伙伴们已帮忙收取您在领地农田中的成熟粮食,您的种植奖励已发送至邮箱,请查收",
|
||||
"time": 720
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"title": "&",
|
||||
"sendName": "您忠诚的小跟班",
|
||||
"content": "激战期联军排行榜奖励",
|
||||
"time": 720
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"title": "&",
|
||||
"sendName": "您忠诚的小跟班",
|
||||
"content": "激战期个人排行榜奖励",
|
||||
"time": 720
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user