后台添加清空账号功能

This commit is contained in:
luying
2020-10-21 10:14:19 +08:00
parent 7b65c1856b
commit aa0b2ba9ee
23 changed files with 149 additions and 0 deletions
+5
View File
@@ -70,6 +70,11 @@ export default class ExpeditionRecord extends BaseModel {
return result;
}
public static async deleteAccount(roleId: string, lean = true) {
let result = await ExpeditionRecordModel.deleteMany({roleId}).lean(lean);
return result||{};
}
}
export const ExpeditionRecordModel = getModelForClass(ExpeditionRecord);