寻宝:修改掉落bug;修改战斗结果判断
This commit is contained in:
@@ -133,8 +133,8 @@ export default class ComBattleTeam extends BaseModel {
|
||||
return team;
|
||||
}
|
||||
|
||||
public static async updateRewardSt(roleId: string, battleCode: string, gotReward: boolean, lean = true) {
|
||||
const team = await ComBattleTeamModel.findOneAndUpdate({ roleIds: roleId, 'roleStatus.battleCode': battleCode}, {$set: {'roleStatus.$.gotReward': gotReward}}).lean(lean);
|
||||
public static async updateRewardSt(roleId: string, gotReward: boolean, lean = true) {
|
||||
const team = await ComBattleTeamModel.findOneAndUpdate({ roleIds: roleId, 'roleStatus.roleId': roleId}, {$set: {'roleStatus.$.gotReward': gotReward}}).lean(lean);
|
||||
return team;
|
||||
}
|
||||
|
||||
@@ -224,6 +224,11 @@ export default class ComBattleTeam extends BaseModel {
|
||||
const team = await ComBattleTeamModel.findOne({roleIds: roleId, 'roleStatus.battleCode': battleCode}).lean(lean);
|
||||
return team;
|
||||
}
|
||||
|
||||
public static async getTeamByCode(teamCode: string, lean = true) {
|
||||
const team = await ComBattleTeamModel.findOne({teamCode}).lean(lean);
|
||||
return team;
|
||||
}
|
||||
}
|
||||
|
||||
export const ComBattleTeamModel = getModelForClass(ComBattleTeam);
|
||||
Reference in New Issue
Block a user