训练场宝箱展示bug

This commit is contained in:
mamengke01
2021-02-06 11:56:18 +08:00
parent d9bea0444c
commit d9458ede5f
22 changed files with 246 additions and 108 deletions
+5
View File
@@ -504,6 +504,11 @@ export default class Role extends BaseModel {
const result = await RoleModel.findOneAndUpdate({ roleId, blockCnt: {$lte: maxBlockCnt - blockCnt}}, {$inc: { blockCnt, friendCnt }}, {new: true}).lean();
return result;
}
public static async updatedRoleMailAt(roleId: string, updatedMailAt: number, lean = true) {
const result = await RoleModel.findOneAndUpdate({ roleId }, {$set: { updatedMailAt }}, {new: true}).lean(lean);
return result;
}
}
export const RoleModel = getModelForClass(Role);