pvp:修复赛季相关
This commit is contained in:
@@ -39,11 +39,12 @@ export default class PvpSeasonResult extends BaseModel {
|
||||
newHeroScores: HeroScore[];
|
||||
|
||||
public static async updatePvpSeasonResult(roleId: string, seasonNum: number, update: PvpSeasonResultUpdate , lean = true) {
|
||||
delete update._id;
|
||||
let result: PvpSeasonResultType = await PvpSeasonResultModel.findOneAndUpdate({roleId, seasonNum}, {$set: update}, {upsert: true, new: true}).lean(lean);
|
||||
return result;
|
||||
}
|
||||
public static async getPvpSeasonResult(roleId: string, seasonNum: number, lean = true) {
|
||||
let result: PvpSeasonResultType = await PvpSeasonResultModel.findOne({ roleId, seasonNum }).lean(lean);
|
||||
public static async getPvpSeasonResult(roleId: string) {
|
||||
let result: PvpSeasonResultType = await PvpSeasonResultModel.findOne({ roleId, show: true }).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user