Compare commits
2 Commits
c8d6f7d433
...
9964e12f80
Author | SHA1 | Date | |
---|---|---|---|
9964e12f80 | |||
a452f12654 |
@ -2,6 +2,7 @@ import {
|
||||
Collection,
|
||||
CreateIndexesOptions,
|
||||
Db,
|
||||
FindCursor,
|
||||
IndexDescription,
|
||||
IndexSpecification,
|
||||
MongoClient,
|
||||
@ -18,6 +19,7 @@ import {HuoDongFun} from './public/huodongfun';
|
||||
import {zbsGroup} from './api_s2c/hbzb/zbs/fun';
|
||||
import {clusterRunOnce} from './clusterUtils';
|
||||
import { PublicShared } from './shared/public/public';
|
||||
import { addGameLog } from './gameLog';
|
||||
|
||||
const indexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[] }> = {
|
||||
item: [
|
||||
@ -627,3 +629,21 @@ export class _mongodb {
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user