fix bug 远征显示下一关等
This commit is contained in:
@@ -7,6 +7,7 @@ import { updateCe } from '../pubUtils/util';
|
||||
* 英雄表
|
||||
*/
|
||||
@index({ roleId: 1, hid: 1 })
|
||||
@index({ roleId: 1, seqId: 1 })
|
||||
export default class Hero extends BaseModel {
|
||||
|
||||
@prop({ required: true })
|
||||
@@ -60,6 +61,10 @@ export default class Hero extends BaseModel {
|
||||
return heros || [];
|
||||
}
|
||||
|
||||
public static async findBySeqIdRange(seqIds: Array<number>, roleId: string, lean = true) {
|
||||
const hero = await HeroModel.find({ seqId: {$in: seqIds}, roleId }).lean(lean);
|
||||
return hero;
|
||||
}
|
||||
public static async findBySeqIdAndRole(seqId: number, roleId: string, lean = true) {
|
||||
const hero = await HeroModel.findOne({ seqId, roleId }).lean(lean);
|
||||
return hero;
|
||||
|
||||
Reference in New Issue
Block a user