好友:修改查看武将

This commit is contained in:
luying
2021-02-06 15:17:51 +08:00
parent 406b833fd6
commit 8c6f9066ba
2 changed files with 20 additions and 13 deletions

View File

@@ -159,8 +159,8 @@ export default class Hero extends BaseModel {
return hero;
}
public static async findByHidRange(hids: Array<number>, roleId: string, lean = true) {
const hero: HeroType[] = await HeroModel.find({ hid: {$in: hids}, roleId }).lean(lean);
public static async findByHidRange(hids: Array<number>, roleId: string, select?: string, getters = false) {
const hero: HeroType[] = await HeroModel.find({ hid: {$in: hids}, roleId }).select(select).lean({ getters });
return hero;
}