Merge branch 'bugfix' into release

This commit is contained in:
dy 2023-12-19 16:24:37 +08:00
commit b84fd92528
2 changed files with 39 additions and 46 deletions

View File

@ -1,20 +1,13 @@
import {ApiCall} from "tsrpc"; import {ApiCall} from "tsrpc";
import {ReqRank, ResRank} from "../../cross/protocols/wzry/PtlRank"; import {ReqRank, ResRank} from "../../cross/protocols/wzry/PtlRank";
import { ChatFun } from "../../public/chat";
import { EmailFun } from "../../public/email";
import { FightFun } from "../../public/fight";
import { Rank } from '../../public/rank/rank';
import { SchedulerWzryDlDstart, wzrygroup } from "../../public/scheduler/scheduler_wzry";
import { WangZheRongYaofun } from "../../public/wzry";
import { PublicShared } from "../../shared/public/public";
import {player} from "../../shared/protocols/user/type"; import {player} from "../../shared/protocols/user/type";
import { rankInfo } from "../../shared/protocols/type";
import {FindOptions} from "mongodb"; import {FindOptions} from "mongodb";
export async function getRankList(limit?: number, projection?: any) { export async function getRankList(limit?: number, projection?: any) {
let option: FindOptions = { let option: FindOptions = {
sort: { sort: {
'data.valArr': -1 'data.valArr': -1,
'data.player.power': -1
} }
} }
if (limit != null) { if (limit != null) {

View File

@ -640,25 +640,25 @@ export class _mongodb {
} }
} }
//@ts-ignore // //@ts-ignore
FindCursor.prototype._toArray = FindCursor.prototype.toArray; // FindCursor.prototype._toArray = FindCursor.prototype.toArray;
//@ts-ignore // //@ts-ignore
FindCursor.prototype.toArray = async function(){ // FindCursor.prototype.toArray = async function(){
let rss = await this._toArray(); // let rss = await this._toArray();
//
//如果返回的数据超过50条 // //如果返回的数据超过50条
if(rss.length>50){ // if(rss.length>50){
addGameLog("system","findCount",null,{ // addGameLog("system","findCount",null,{
collection: this.namespace.collection, // collection: this.namespace.collection,
db:this.namespace.db, // db:this.namespace.db,
count:rss.length // count:rss.length
}) // })
console.log("system,findCount",{ // console.log("system,findCount",{
collection: this.namespace.collection, // collection: this.namespace.collection,
db:this.namespace.db, // db:this.namespace.db,
count:rss.length // count:rss.length
}) // })
console.trace(); // console.trace();
} // }
return rss; // return rss;
} // }