✨ feat(寻宝): 队长奖励加成限制上限
This commit is contained in:
@@ -377,6 +377,13 @@ export default class ComBattleTeam extends BaseModel {
|
||||
return teams;
|
||||
}
|
||||
|
||||
public static async getCapExtraRewardCnt(roleId: string, time: Date) {
|
||||
const teams: ComBattleTeamType[] = await ComBattleTeamModel.find({
|
||||
capId: roleId, createdAt: { $gte: time }, status: {$in: [0, 1, 2]}, hasTimeExtraReward: true
|
||||
}).lean();
|
||||
return teams;
|
||||
}
|
||||
|
||||
public static async getTeamByRoleAndBattleCode(roleId: string, battleCode: string, lean = true) {
|
||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOne({roleIds: roleId, 'roleStatus.battleCode': battleCode}).lean(lean);
|
||||
return team;
|
||||
|
||||
Reference in New Issue
Block a user