后台:邮件查询

This commit is contained in:
luying
2021-11-29 20:33:36 +08:00
parent 7e46663868
commit c4e4e472d1
13 changed files with 236 additions and 44 deletions

View File

@@ -71,8 +71,15 @@ export default class Serverlist extends BaseModel {
medianCe: number; // 中位数武将战力、缩小10000倍后的结果
public static async getAllServerList() {
let servers: ServerlistType[] = await ServerlistModel.find().lean({ getters: true, virtuals: true });
return servers;
let id = await CounterModel.getCounter(COUNTER.SERVER);
let result: ServerlistType[] = [];
let n = Math.ceil(id/1000);
console.log('****', id, n)
for(let i = 0; i < n; i++) {
let servers: ServerlistType[] = await ServerlistModel.find().limit(1000).skip(i * 1000).lean({ getters: true, virtuals: true });
result.push(...servers);
}
return result;
}
public static async findByServerId(serverId: number) {