军团活动:诸侯混战城门血量

This commit is contained in:
luying
2022-03-01 10:10:11 +08:00
parent 478bfd5ddd
commit c5e5ca4b51
19 changed files with 231 additions and 77 deletions
+4 -4
View File
@@ -37,7 +37,7 @@ export class CeAttrDataRole {
}
}
class TopHero {
export class TopHero {
@prop({ required: true })
hid: number; // 武将id
@prop({ required: true })
@@ -696,12 +696,12 @@ export default class Role extends BaseModel {
}
// 获取战力在中位数的玩家
public static async getMedianRole(serverId: number) {
public static async getActivePlayers(serverId: number) {
let yesterday = <Date>getTimeFunD().getBeforeDayWithHour(1);
const roles: RoleType[] = await RoleModel.find({ serverId, updatedAt: { $gte: yesterday } })
.select('topLineup')
.select('topLineup topLineupCe')
.sort({ ce: -1 }).lean();
return roles[Math.floor(roles.length / 2)]
return roles
}
public static async receiveRankReward(roleId: string, ids: number[]) {