Merge branch 'bugfix' into dev
This commit is contained in:
commit
d0a80a4c73
1792
package-lock.json
generated
1792
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,7 @@
|
||||
"json5": "^2.2.3",
|
||||
"mathjs": "^11.4.0",
|
||||
"mongodb": "^4.17.1",
|
||||
"node-gyp": "^10.0.1",
|
||||
"ramda": "^0.29.1",
|
||||
"redis": "^4.3.1",
|
||||
"shelljs": "^0.8.5",
|
||||
|
@ -1,23 +1,29 @@
|
||||
import {ApiCall} from "tsrpc";
|
||||
import {ReqRank, ResRank} from "../../cross/protocols/wzry/PtlRank";
|
||||
import {player} from "../../shared/protocols/user/type";
|
||||
import {FindOptions} from "mongodb";
|
||||
import {Filter, FindOptions, OptionalId} from "mongodb";
|
||||
import { CollectionRankList } from "../../module/collection_rank";
|
||||
|
||||
export async function getRankList(limit?: number, projection?: any) {
|
||||
export async function getRankList(limit?: number, projection?: any, _where?:any) {
|
||||
let option: FindOptions = {
|
||||
sort: {
|
||||
'data.valArr': -1,
|
||||
'data.player.power': -1
|
||||
}
|
||||
}
|
||||
let filter:Filter<OptionalId<CollectionRankList>> = {type: 'wzryCross'};
|
||||
|
||||
if (limit != null) {
|
||||
option.limit = limit;
|
||||
}
|
||||
if (projection != null) {
|
||||
option.projection = projection;
|
||||
}
|
||||
if (_where != null) {
|
||||
Object.assign(filter, _where);
|
||||
}
|
||||
|
||||
let listArr = await G.mongodb.collection('rankList').find({type: 'wzryCross'}, option).toArray();
|
||||
let listArr = await G.mongodb.collection('rankList').find(filter, option).toArray();
|
||||
let list = listArr.map(l => l.data);
|
||||
|
||||
return list;
|
||||
|
@ -102,9 +102,10 @@ export class SchedulerWzryDlDjinji extends SchedulerWzryAutoBaoMing {
|
||||
return
|
||||
}
|
||||
|
||||
let _zuanshiUser = await getRankList(null,{
|
||||
let _zuanshiUser = await getRankList(256,{
|
||||
'data.player.uid':1
|
||||
}); //Rank.list.wzryCross.getRankListAll()
|
||||
},{'data.player.isNpc':{$exists:false}});
|
||||
|
||||
if (_zuanshiUser.length < 256) {
|
||||
console.log("本期无玩家,此次不执行")
|
||||
await this.record()
|
||||
@ -117,10 +118,10 @@ export class SchedulerWzryDlDjinji extends SchedulerWzryAutoBaoMing {
|
||||
for (let index = 0; index < _zuanshiUser.length; index++) {
|
||||
const element = _zuanshiUser[index];
|
||||
_userList.push(element.player.uid)
|
||||
if (element.player.uid.indexOf('npc_') != -1) {
|
||||
if (_userList.length >= 256) break
|
||||
continue
|
||||
}
|
||||
// if (element.player.uid.indexOf('npc_') != -1) {
|
||||
// if (_userList.length >= 256) break
|
||||
// continue
|
||||
// }
|
||||
// 发送晋级钻石赛奖励
|
||||
prize.length > 0 && EmailFun.addEmail({
|
||||
uid: element.player.uid,
|
||||
|
Loading…
Reference in New Issue
Block a user