远征:真人玩家数据从小到大取玩家数值

This commit is contained in:
luying
2022-09-27 10:33:05 +08:00
parent fe29577ebf
commit 930b2860d7
2 changed files with 3 additions and 3 deletions

View File

@@ -109,6 +109,7 @@ export class Teraph {
@index({ roleName: 1 })
@index({ serverId: 1, roleId: 1 })
@index({ towerLv: -1, towerUpTime: 1 })
@index({ topLineupCe: 1, updatedAt: 1 })
@index({ ce: -1 })
// @index({ userInfo.uid: 1, serverId: 1 })
export default class Role extends BaseModel {
@@ -752,7 +753,7 @@ export default class Role extends BaseModel {
public static async findByCeScale(min: number, max: number) {
const result: RoleType[] = await RoleModel.find({ topLineupCe: { $lte: max, $gte: min } })
.populate('topLineup.hero')
.sort({ updatedAt: -1 }).limit(100).lean({ getters: true, virtuals: true });
.sort({ topLineupCe: 1, updatedAt: 1 }).limit(10).lean({ getters: true, virtuals: true });
return result;
}