🐞 fix(巅峰演武): 修复刷新对手信息错误

This commit is contained in:
luying
2022-10-31 21:26:25 +08:00
parent 04deea8c2d
commit 7eb5655680
2 changed files with 3 additions and 3 deletions

View File

@@ -69,8 +69,8 @@ export default class PvpHistoryOpp extends BaseModel {
return result;
}
public static async setStatus(roleId: string, oppRoleId: string, status: number) {
const result: PvpHistoryOppType = await PvpHistoryOppModel.findOneAndUpdate({ roleId, oppRoleId }, {status}, {new: true}).lean();
public static async setStatus(_id: string, status: number) {
const result: PvpHistoryOppType = await PvpHistoryOppModel.findByIdAndUpdate(_id, { $set: {status}}, {new: true}).lean();
return result;
}