Revert "🎈 perf(排行榜): 武将排行榜修改为读数据库"
This reverts commit 2c63ac1e50532c20d0279b9da38e9cd0fd53fb08.
This commit is contained in:
@@ -101,8 +101,6 @@ export class EPlace {
|
||||
@index({ seqId: 1 })
|
||||
@index({ roleId: 1, hid: 1 })
|
||||
@index({ roleId: 1, ce: -1 })
|
||||
@index({ serverId: 1, ce: -1 })
|
||||
@index({ serverId: 1, hid: 1, ce: -1 })
|
||||
export default class Hero extends BaseModel {
|
||||
|
||||
@prop({ required: true })
|
||||
@@ -190,16 +188,6 @@ export default class Hero extends BaseModel {
|
||||
return heroes
|
||||
}
|
||||
|
||||
public static async findByServerIdAndSortByCe(serverId: number) {
|
||||
const heroes: HeroType[] = await HeroROModel.find({ serverId }).sort({ ce: -1 }).select('hid skinId star colorStar lv quality job roleId ce').limit(200).lean();
|
||||
return heroes
|
||||
}
|
||||
|
||||
public static async findByServerIdAndHidAndSortByCe(serverId: number, hid: number) {
|
||||
const heroes: HeroType[] = await HeroROModel.find({ serverId, hid }).sort({ ce: -1 }).select('hid skinId star colorStar lv quality job roleId ce').limit(200).lean();
|
||||
return heroes
|
||||
}
|
||||
|
||||
public static async findBySeqIdRange(seqIds: Array<number>, roleId: string, lean = true) {
|
||||
const hero: HeroType[] = await HeroModel.find({ seqId: { $in: seqIds }, roleId }).lean(lean);
|
||||
return hero;
|
||||
|
||||
Reference in New Issue
Block a user