This commit is contained in:
luying
2022-04-11 21:21:22 +08:00
parent c6ebb62c6a
commit cb243421ad
6 changed files with 15 additions and 10 deletions

View File

@@ -29,6 +29,11 @@ export default class SurveyRec extends BaseModel {
return rec;
}
public static async findByRole(roleId: string) {
let rec: SurveyRecType[] = await SurveyRecModel.find({ roleId }).lean();
return rec;
}
public static async findByCode(code: string) {
let rec: SurveyRecType = await SurveyRecModel.findOne({ code }).lean();
return rec;