Compare commits
2 Commits
c8d6f7d433
...
9964e12f80
Author | SHA1 | Date | |
---|---|---|---|
9964e12f80 | |||
a452f12654 |
@ -2,6 +2,7 @@ import {
|
|||||||
Collection,
|
Collection,
|
||||||
CreateIndexesOptions,
|
CreateIndexesOptions,
|
||||||
Db,
|
Db,
|
||||||
|
FindCursor,
|
||||||
IndexDescription,
|
IndexDescription,
|
||||||
IndexSpecification,
|
IndexSpecification,
|
||||||
MongoClient,
|
MongoClient,
|
||||||
@ -18,6 +19,7 @@ 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: [
|
||||||
@ -626,4 +628,22 @@ export class _mongodb {
|
|||||||
indexInformation(name) {
|
indexInformation(name) {
|
||||||
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;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user