Compare commits

..

No commits in common. "9964e12f805876d00112f8ac82c87e60bdbfd1b5" and "c8d6f7d4333c71dd82d0a21b69ffc0deff09b900" have entirely different histories.

View File

@ -2,7 +2,6 @@ import {
Collection, Collection,
CreateIndexesOptions, CreateIndexesOptions,
Db, Db,
FindCursor,
IndexDescription, IndexDescription,
IndexSpecification, IndexSpecification,
MongoClient, MongoClient,
@ -19,7 +18,6 @@ import {HuoDongFun} from './public/huodongfun';
import {zbsGroup} from './api_s2c/hbzb/zbs/fun'; import {zbsGroup} from './api_s2c/hbzb/zbs/fun';
import {clusterRunOnce} from './clusterUtils'; import {clusterRunOnce} from './clusterUtils';
import { PublicShared } from './shared/public/public'; import { PublicShared } from './shared/public/public';
import { addGameLog } from './gameLog';
const indexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[] }> = { const indexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[] }> = {
item: [ item: [
@ -629,21 +627,3 @@ export class _mongodb {
return this.db.indexInformation(name) return this.db.indexInformation(name)
} }
} }
//@ts-ignore
FindCursor.prototype._toArray = FindCursor.prototype.toArray;
//@ts-ignore
FindCursor.prototype.toArray = async function(){
let rss = await this._toArray();
//如果返回的数据超过50条
if(rss.length>50){
addGameLog("system","findCount",null,{
collection: this.namespace.collection,
db:this.namespace.db,
filter: this.filter,
count:rss.length
})
}
return rss;
}