寻宝:修改数组声明风格
This commit is contained in:
@@ -239,7 +239,7 @@ export class ComBattleHandler {
|
|||||||
* @param msg
|
* @param msg
|
||||||
* @param session
|
* @param session
|
||||||
*/
|
*/
|
||||||
async getTeams(msg: { blueprtIds: Array<number> }, session: BackendSession) {
|
async getTeams(msg: { blueprtIds: number[] }, session: BackendSession) {
|
||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
let { lv } = await Role.findByRoleId(roleId);
|
let { lv } = await Role.findByRoleId(roleId);
|
||||||
if (lv < COM_BTL_CONST.ENABLE_LV) return resResult(STATUS.COM_BATTLE_LV_NOT_ENOUGH);
|
if (lv < COM_BTL_CONST.ENABLE_LV) return resResult(STATUS.COM_BATTLE_LV_NOT_ENOUGH);
|
||||||
@@ -251,12 +251,12 @@ export class ComBattleHandler {
|
|||||||
/**
|
/**
|
||||||
* ! deprecate
|
* ! deprecate
|
||||||
* @description 队伍准备
|
* @description 队伍准备
|
||||||
* @param {{teamCode: string, heroes: Array<number>}} msg
|
* @param {{teamCode: string, heroes: number[]}} msg
|
||||||
* @param {BackendSession} session
|
* @param {BackendSession} session
|
||||||
* @returns
|
* @returns
|
||||||
* @memberof ComBattleHandler
|
* @memberof ComBattleHandler
|
||||||
*/
|
*/
|
||||||
async teammateReady(msg: {teamCode: string, heroes: Array<number>}, session: BackendSession) {
|
async teammateReady(msg: {teamCode: string, heroes: number[]}, session: BackendSession) {
|
||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
let { teamCode, heroes } = msg;
|
let { teamCode, heroes } = msg;
|
||||||
let teamStatus = this.teamMap.get(teamCode);
|
let teamStatus = this.teamMap.get(teamCode);
|
||||||
@@ -279,12 +279,12 @@ export class ComBattleHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 出兵时记录玩家阵容
|
* @description 出兵时记录玩家阵容
|
||||||
* @param {{teamCode: string, heroes: Array<number>}} msg 队伍编号;阵容
|
* @param {{teamCode: string, heroes: number[]}} msg 队伍编号;阵容
|
||||||
* @param {BackendSession} session
|
* @param {BackendSession} session
|
||||||
* @returns
|
* @returns
|
||||||
* @memberof ComBattleHandler
|
* @memberof ComBattleHandler
|
||||||
*/
|
*/
|
||||||
async setupHeroes(msg: {teamCode: string, heroes: Array<number>, battleCode: string}, session: BackendSession) {
|
async setupHeroes(msg: {teamCode: string, heroes: number[], battleCode: string}, session: BackendSession) {
|
||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
let { teamCode, heroes, battleCode = 'default' } = msg;
|
let { teamCode, heroes, battleCode = 'default' } = msg;
|
||||||
if (!heroes || heroes.length === 0) return resResult(STATUS.COM_BATTLE_HEROES_ERR);
|
if (!heroes || heroes.length === 0) return resResult(STATUS.COM_BATTLE_HEROES_ERR);
|
||||||
@@ -433,12 +433,12 @@ export class ComBattleHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 战场中的状态同步,战斗结果判定
|
* @description 战场中的状态同步,战斗结果判定
|
||||||
* @param {{teamCode: string, bossHurts: Array<{dataId: number, hurtHp: number}>, killed: Array<number>, curRnd: number}} msg 队伍编号;boss 承伤;武将阵亡;当前回合
|
* @param {{teamCode: string, bossHurts: Array<{dataId: number, hurtHp: number}>, killed: number[], curRnd: number}} msg 队伍编号;boss 承伤;武将阵亡;当前回合
|
||||||
* @param {BackendSession} session
|
* @param {BackendSession} session
|
||||||
* @returns
|
* @returns
|
||||||
* @memberof ComBattleHandler
|
* @memberof ComBattleHandler
|
||||||
*/
|
*/
|
||||||
async action(msg: {teamCode: string, bossHurts: Array<{dataId: number, hurtHp: number}>, killed: Array<number>, curRnd: number}, session: BackendSession) {
|
async action(msg: {teamCode: string, bossHurts: Array<{dataId: number, hurtHp: number}>, killed: number[], curRnd: number}, session: BackendSession) {
|
||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
let { teamCode, killed, bossHurts, curRnd } = msg;
|
let { teamCode, killed, bossHurts, curRnd } = msg;
|
||||||
let teamStatus = this.teamMap.get(teamCode);
|
let teamStatus = this.teamMap.get(teamCode);
|
||||||
@@ -599,12 +599,12 @@ export class ComBattleHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取藏宝图数量
|
* @description 获取藏宝图数量
|
||||||
* @param {{ids: Array<number>}} msg 藏宝图Id数组,可选参数
|
* @param {{ids: number[]}} msg 藏宝图Id数组,可选参数
|
||||||
* @param {BackendSession} session
|
* @param {BackendSession} session
|
||||||
* @returns
|
* @returns
|
||||||
* @memberof ComBattleHandler
|
* @memberof ComBattleHandler
|
||||||
*/
|
*/
|
||||||
async getBlueprtCount(msg: {ids: Array<number>}, session: BackendSession) {
|
async getBlueprtCount(msg: {ids: number[]}, session: BackendSession) {
|
||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
let { ids } = msg;
|
let { ids } = msg;
|
||||||
let blueprts;
|
let blueprts;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { ChannelUser } from '../domain/ChannelUser';
|
|||||||
* @param qualityArr 品质数组,在所有给定品质的藏宝图中筛选1
|
* @param qualityArr 品质数组,在所有给定品质的藏宝图中筛选1
|
||||||
* @param cnt 返回藏宝图数量
|
* @param cnt 返回藏宝图数量
|
||||||
*/
|
*/
|
||||||
export function getRandBlueprtId(qualityArr: Array<number>, cnt = 1) {
|
export function getRandBlueprtId(qualityArr: number[], cnt = 1) {
|
||||||
if (!qualityArr || !qualityArr.length) return null;
|
if (!qualityArr || !qualityArr.length) return null;
|
||||||
let blueprtIdArr = [];
|
let blueprtIdArr = [];
|
||||||
for (let q of qualityArr) {
|
for (let q of qualityArr) {
|
||||||
@@ -168,7 +168,7 @@ export async function getRealReward(blueprtId: number, roleSt: RoleStatus) {
|
|||||||
return fixRewardStr;
|
return fixRewardStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getAssistTimesByQuality(roleId: string, qualityArr?: Array<number>) {
|
export async function getAssistTimesByQuality(roleId: string, qualityArr?: number[]) {
|
||||||
let teams = await ComBattleTeamModel.getAssistTeamsByTime(roleId, qualityArr, new Date(new Date().setHours(0, 0, 0, 0)), true);
|
let teams = await ComBattleTeamModel.getAssistTeamsByTime(roleId, qualityArr, new Date(new Date().setHours(0, 0, 0, 0)), true);
|
||||||
let cntMap = new Map<number, number>();
|
let cntMap = new Map<number, number>();
|
||||||
teams.forEach(team => {
|
teams.forEach(team => {
|
||||||
@@ -441,7 +441,7 @@ export function randEquipPrintId(warInfo) {
|
|||||||
* @param {RoleStatus[]} roleStatus 队伍内的所有队友
|
* @param {RoleStatus[]} roleStatus 队伍内的所有队友
|
||||||
*/
|
*/
|
||||||
export async function getComBattleFriendAdd(roleStatus: RoleStatus[]) {
|
export async function getComBattleFriendAdd(roleStatus: RoleStatus[]) {
|
||||||
let hasAdd = new Array<string>(); //roleIds
|
let hasAdd: string[] = []; //roleIds
|
||||||
for(let myRoleStatus of roleStatus) {
|
for(let myRoleStatus of roleStatus) {
|
||||||
for(let rs of roleStatus) {
|
for(let rs of roleStatus) {
|
||||||
if(myRoleStatus.roleId == rs.roleId) continue;
|
if(myRoleStatus.roleId == rs.roleId) continue;
|
||||||
@@ -463,11 +463,11 @@ export async function getComBattleFriendAdd(roleStatus: RoleStatus[]) {
|
|||||||
* @description 检查玩家是否符合加入队伍的条件
|
* @description 检查玩家是否符合加入队伍的条件
|
||||||
* @param {Partial<RoleType>} roleInfo 要加入玩家的信息
|
* @param {Partial<RoleType>} roleInfo 要加入玩家的信息
|
||||||
* @param {string} roleId 要加入玩家的 id
|
* @param {string} roleId 要加入玩家的 id
|
||||||
* @param {Array<string>} roleIds 队伍中当前玩家列表
|
* @param {string[]} roleIds 队伍中当前玩家列表
|
||||||
* @param {number} ceLimit
|
* @param {number} ceLimit
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async function teammateValid(roleInfo: Partial<RoleType>, roleId: string, roleIds: Array<string>, ceLimit: number) {
|
async function teammateValid(roleInfo: Partial<RoleType>, roleId: string, roleIds: string[], ceLimit: number) {
|
||||||
if (!roleInfo || roleIds.indexOf(roleId) !== -1) return false;
|
if (!roleInfo || roleIds.indexOf(roleId) !== -1) return false;
|
||||||
|
|
||||||
const isBlack = await teammateInBlackList(roleId, roleIds);
|
const isBlack = await teammateInBlackList(roleId, roleIds);
|
||||||
@@ -483,12 +483,12 @@ async function teammateValid(roleInfo: Partial<RoleType>, roleId: string, roleId
|
|||||||
* @description 将用户信息转换成寻宝组队所需的 RoleStatus
|
* @description 将用户信息转换成寻宝组队所需的 RoleStatus
|
||||||
* @export
|
* @export
|
||||||
* @param {string} roleId 要加入玩家的信息
|
* @param {string} roleId 要加入玩家的信息
|
||||||
* @param {Array<string>} roleIds 队伍中当前玩家列表
|
* @param {string[]} roleIds 队伍中当前玩家列表
|
||||||
* @param {number} ceLimit
|
* @param {number} ceLimit
|
||||||
* @param {number} quality
|
* @param {number} quality
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function getValidTeammateRoleSt(roleId: string, roleIds: Array<string>, ceLimit: number, quality: number) {
|
export async function getValidTeammateRoleSt(roleId: string, roleIds: string[], ceLimit: number, quality: number) {
|
||||||
let roleInfo = await RoleModel.findByRoleId(roleId);
|
let roleInfo = await RoleModel.findByRoleId(roleId);
|
||||||
let { roleName, headHid = 19, sHid = 19, topFiveCe, lv } = roleInfo;
|
let { roleName, headHid = 19, sHid = 19, topFiveCe, lv } = roleInfo;
|
||||||
const valid = await teammateValid(roleInfo, roleId, roleIds, ceLimit);
|
const valid = await teammateValid(roleInfo, roleId, roleIds, ceLimit);
|
||||||
@@ -503,10 +503,10 @@ export async function getValidTeammateRoleSt(roleId: string, roleIds: Array<stri
|
|||||||
* @description 检查队伍中是否有人互为黑名单
|
* @description 检查队伍中是否有人互为黑名单
|
||||||
* @export
|
* @export
|
||||||
* @param {string} roleId 要加入队伍的玩家 id
|
* @param {string} roleId 要加入队伍的玩家 id
|
||||||
* @param {Array<string>} roleIds 队伍中已有的玩家 id
|
* @param {string[]} roleIds 队伍中已有的玩家 id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function teammateInBlackList(roleId: string, roleIds: Array<string>) {
|
export async function teammateInBlackList(roleId: string, roleIds: string[]) {
|
||||||
for(let teammateRoleId of roleIds) {
|
for(let teammateRoleId of roleIds) {
|
||||||
const isBlack = await FriendRelationModel.isInBlackList(roleId, teammateRoleId);
|
const isBlack = await FriendRelationModel.isInBlackList(roleId, teammateRoleId);
|
||||||
if (isBlack === true) return true;
|
if (isBlack === true) return true;
|
||||||
@@ -530,7 +530,7 @@ export function blueprtIdValid(id: number) {
|
|||||||
* @param {number} ceLimit
|
* @param {number} ceLimit
|
||||||
* @param {number} bossHp
|
* @param {number} bossHp
|
||||||
* @param {number} quality
|
* @param {number} quality
|
||||||
* @param {Array<BossHp>} bossHpArr
|
* @param {BossHp[]} bossHpArr
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function createComTeamData(teamCode: string, pub: boolean, blueprtId: number, capId: string, ceLimit: number) {
|
export function createComTeamData(teamCode: string, pub: boolean, blueprtId: number, capId: string, ceLimit: number) {
|
||||||
@@ -689,11 +689,11 @@ export async function addRobotsLater(comTeam: MemComBtlTeam, roleInfo: RoleType,
|
|||||||
/**
|
/**
|
||||||
* @description 从数组里找出第一个不在黑名单的队伍
|
* @description 从数组里找出第一个不在黑名单的队伍
|
||||||
* @export
|
* @export
|
||||||
* @param {Array<ComBattleTeamType>} teams 队伍数组
|
* @param {ComBattleTeamType[]} teams 队伍数组
|
||||||
* @param {string} roleId 要加入的玩家 id
|
* @param {string} roleId 要加入的玩家 id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function oneTeamNotInBlack(teams: Array<ComBattleTeamType>, roleId: string) {
|
export async function oneTeamNotInBlack(teams: ComBattleTeamType[], roleId: string) {
|
||||||
for(let team of teams) {
|
for(let team of teams) {
|
||||||
let { roleIds } = team;
|
let { roleIds } = team;
|
||||||
const inBlackList = await teammateInBlackList(roleId, roleIds);
|
const inBlackList = await teammateInBlackList(roleId, roleIds);
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ export class RoleStatus {
|
|||||||
battleCode: string;
|
battleCode: string;
|
||||||
// 玩家所用阵容
|
// 玩家所用阵容
|
||||||
@prop({ required: false, type: Number, default: [] })
|
@prop({ required: false, type: Number, default: [] })
|
||||||
heroes: Array<number>;
|
heroes: number[];
|
||||||
// 阵亡武将
|
// 阵亡武将
|
||||||
@prop({ required: false, type: Number, default: [] })
|
@prop({ required: false, type: Number, default: [] })
|
||||||
killed: Array<number>;
|
killed: number[];
|
||||||
// 是否情谊助阵
|
// 是否情谊助阵
|
||||||
@prop({ required: false, default: false })
|
@prop({ required: false, default: false })
|
||||||
isFrd: boolean;
|
isFrd: boolean;
|
||||||
@@ -99,7 +99,7 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
teamCode: string;
|
teamCode: string;
|
||||||
|
|
||||||
@prop({ required: true, type: String, default: [], _id: false })
|
@prop({ required: true, type: String, default: [], _id: false })
|
||||||
roleIds: Array<string>
|
roleIds: string[];
|
||||||
|
|
||||||
// 队伍是否开放加入
|
// 队伍是否开放加入
|
||||||
@prop({ required: true, default: true })
|
@prop({ required: true, default: true })
|
||||||
@@ -118,7 +118,7 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
status: number;
|
status: number;
|
||||||
|
|
||||||
@prop({ required: true, type: RoleStatus, default: [] })
|
@prop({ required: true, type: RoleStatus, default: [] })
|
||||||
roleStatus: Array<RoleStatus>;
|
roleStatus: RoleStatus[];
|
||||||
|
|
||||||
// 队长 roleId
|
// 队长 roleId
|
||||||
@prop({ required: true })
|
@prop({ required: true })
|
||||||
@@ -138,7 +138,7 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
|
|
||||||
// 单个 boss 血量状态
|
// 单个 boss 血量状态
|
||||||
@prop({ required: false, type: BossHp, default: [] })
|
@prop({ required: false, type: BossHp, default: [] })
|
||||||
bossHpArr: Array<BossHp>;
|
bossHpArr: BossHp[];
|
||||||
|
|
||||||
// 队伍是否开放加入
|
// 队伍是否开放加入
|
||||||
@prop({ required: true, default: false })
|
@prop({ required: true, default: false })
|
||||||
@@ -169,12 +169,12 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async updateHeroes(teamCode: string, roleId: string, heroes: Array<number>, lean = true) {
|
public static async updateHeroes(teamCode: string, roleId: string, heroes: number[], lean = true) {
|
||||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode, 'roleStatus.roleId': roleId}, {$set: {'roleStatus.$.heroes': heroes}}, {new: true}).lean(lean);
|
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode, 'roleStatus.roleId': roleId}, {$set: {'roleStatus.$.heroes': heroes}}, {new: true}).lean(lean);
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async setupBattleInfo(teamCode: string, roleId: string, heroes: Array<number>, battleCode: string, lean = true) {
|
public static async setupBattleInfo(teamCode: string, roleId: string, heroes: number[], battleCode: string, lean = true) {
|
||||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode, 'roleStatus.roleId': roleId}, {$set: {'roleStatus.$.heroes': heroes, 'roleStatus.$.battleCode': battleCode}}, {new: true}).lean(lean);
|
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode, 'roleStatus.roleId': roleId}, {$set: {'roleStatus.$.heroes': heroes, 'roleStatus.$.battleCode': battleCode}}, {new: true}).lean(lean);
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
@@ -184,7 +184,7 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async syncTeamData(teamData: {teamCode: string, status: number, roleStatus: Array<RoleStatus>, bossHpArr: Array<BossHp>}, timeout = false, lean = true) {
|
public static async syncTeamData(teamData: {teamCode: string, status: number, roleStatus: RoleStatus[], bossHpArr: BossHp[]}, timeout = false, lean = true) {
|
||||||
console.log('syncTeamData bossHpArr: ', teamData.bossHpArr);
|
console.log('syncTeamData bossHpArr: ', teamData.bossHpArr);
|
||||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout}}, {new: true}).lean(lean);
|
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout}}, {new: true}).lean(lean);
|
||||||
return team;
|
return team;
|
||||||
@@ -232,23 +232,23 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
return teams;
|
return teams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getTeamByBlueprt(blueprtIds: Array<number>, status: number, pub = true, limit = 50, lean = true) {
|
public static async getTeamByBlueprt(blueprtIds: number[], status: number, pub = true, limit = 50, lean = true) {
|
||||||
const teams: ComBattleTeamType[] = await ComBattleTeamModel.find({blueprtId: {$in: blueprtIds}, status, pub}).limit(limit).lean(lean);
|
const teams: ComBattleTeamType[] = await ComBattleTeamModel.find({blueprtId: {$in: blueprtIds}, status, pub}).limit(limit).lean(lean);
|
||||||
return teams;
|
return teams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getOneTeamByQualityAndSt(qualityArr: Array<number>, status: number, ce = 0, pub = true, cntLmt = 2, lean = true) {
|
public static async getOneTeamByQualityAndSt(qualityArr: number[], status: number, ce = 0, pub = true, cntLmt = 2, lean = true) {
|
||||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOne({quality: {$in: qualityArr}, status, ceLimit: {$lte: ce}, pub, roleCnt: {$lte: cntLmt}}).lean(lean);
|
const team: ComBattleTeamType = await ComBattleTeamModel.findOne({quality: {$in: qualityArr}, status, ceLimit: {$lte: ce}, pub, roleCnt: {$lte: cntLmt}}).lean(lean);
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getOtherTeamByQualityAndSt(roleId: string, qualityArr: Array<number>, status: number, lvRange: number, ce = 0, pub = true, cntLmt = 2, lean = true) {
|
public static async getOtherTeamByQualityAndSt(roleId: string, qualityArr: number[], status: number, lvRange: number, ce = 0, pub = true, cntLmt = 2, lean = true) {
|
||||||
const curTime = new Date(Date.now() - 10 * 60 * 1000); // 10分钟之前
|
const curTime = new Date(Date.now() - 10 * 60 * 1000); // 10分钟之前
|
||||||
const team: ComBattleTeamType[] = await ComBattleTeamModel.find({quality: {$in: qualityArr}, status, lvRange, ceLimit: {$lte: ce}, pub, roleCnt: {$lte: cntLmt}, roleIds: {$nin: [roleId]}, updatedAt: {$gte: curTime}}).lean(lean);
|
const team: ComBattleTeamType[] = await ComBattleTeamModel.find({quality: {$in: qualityArr}, status, lvRange, ceLimit: {$lte: ce}, pub, roleCnt: {$lte: cntLmt}, roleIds: {$nin: [roleId]}, updatedAt: {$gte: curTime}}).lean(lean);
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getTeamByRoleAndTime(roleId: string, qualityArr?: Array<number>, time?: Date, isAssist?: boolean, limitCnt = 50, lean = true) {
|
public static async getTeamByRoleAndTime(roleId: string, qualityArr?: number[], time?: Date, isAssist?: boolean, limitCnt = 50, lean = true) {
|
||||||
let query = {roleIds: roleId};
|
let query = {roleIds: roleId};
|
||||||
if (qualityArr) {
|
if (qualityArr) {
|
||||||
query = Object.assign(query, {quality: {$in: qualityArr}});
|
query = Object.assign(query, {quality: {$in: qualityArr}});
|
||||||
@@ -263,7 +263,7 @@ export default class ComBattleTeam extends BaseModel {
|
|||||||
return teams;
|
return teams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async getAssistTeamsByTime(roleId: string, qualityArr?: Array<number>, time?: Date, isAssist?: boolean, lean = true) {
|
public static async getAssistTeamsByTime(roleId: string, qualityArr?: number[], time?: Date, isAssist?: boolean, lean = true) {
|
||||||
let query = {roleIds: roleId, status: {$in: [0, 1, 2]}}; // 失败不计入助战
|
let query = {roleIds: roleId, status: {$in: [0, 1, 2]}}; // 失败不计入助战
|
||||||
if (qualityArr) {
|
if (qualityArr) {
|
||||||
query = Object.assign(query, {quality: {$in: qualityArr}});
|
query = Object.assign(query, {quality: {$in: qualityArr}});
|
||||||
|
|||||||
Reference in New Issue
Block a user