feat(comBattle): 寻宝邀请的推送范围由世界改为军团

This commit is contained in:
liangtongchuan
2023-03-14 11:56:28 +08:00
parent b3c5aa9236
commit 37af7c570a
5 changed files with 17 additions and 15 deletions
+1
View File
@@ -164,6 +164,7 @@ export const STATUS = {
COM_BATTLE_INVITE_LV_NOT_ENOUGH: { code: 20638, simStr: '对方队伍等级不足,无法邀请' },
COM_BATTLE_INVITE_CE_LIMIT: { code: 20639, simStr: '对方队伍战力不足,无法邀请' },
COM_BATTLE_RETREAT_ERR: { code: 20640, simStr: '队伍不止单人,不允许撤退' },
COM_BATTLE_INVITE_GUILD_ERR: { code: 20641, simStr: '需要先加入军团才能一键邀请' },
// 共斗藏宝图合成
COM_BLUEPRT_QUALITY_CANNOT_COMPOSE: { code: 20650, simStr: '该品质藏宝图不可合成' },
COM_BLUEPRT_COUNT_ERROR: { code: 20651, simStr: '材料数量不足' },
+2 -2
View File
@@ -399,8 +399,8 @@ export default class ComBattleTeam extends BaseModel {
return team;
}
public static async findInvitations(roleId: string, minLv: number, maxLv: number, ce: number, refreshTime: number, limit: number) {
const invitations: ComBattleTeamType[] = await ComBattleTeamModel.find({ inviteTarget: { $in: ['world', roleId] },status: 0, isInviting: true, lv: { $gte: minLv, $lte: maxLv }, ceLimit: { $lte: ce }, inviteTime: { $gte: refreshTime } }).sort({ inviteTime: -1 }).limit(limit).lean();
public static async findInvitations(roleId: string, guildCode: string, minLv: number, maxLv: number, ce: number, refreshTime: number, limit: number) {
const invitations: ComBattleTeamType[] = await ComBattleTeamModel.find({ inviteTarget: { $in: [guildCode, roleId] },status: 0, isInviting: true, lv: { $gte: minLv, $lte: maxLv }, ceLimit: { $lte: ce }, inviteTime: { $gte: refreshTime } }).sort({ inviteTime: -1 }).limit(limit).lean();
return invitations;
}
}