pvp:修复赛季显示
This commit is contained in:
@@ -43,6 +43,12 @@ export default class PvpSeasonResult extends BaseModel {
|
||||
let result: PvpSeasonResultType = await PvpSeasonResultModel.findOneAndUpdate({roleId, seasonNum}, {$set: update}, {upsert: true, new: true}).lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async setShow(roleId: string) {
|
||||
let result = await PvpSeasonResultModel.updateMany({ roleId, show: true }, { show: false }).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
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