|
@@ -15,12 +15,12 @@ class StatisticsService extends CrudService {
|
|
|
const resList = [];
|
|
|
for (const team of teamList) {
|
|
|
const { team_id } = team;
|
|
|
- const matchList = await this.ctx.model.Schedule.find({ match_id, $or: [{ red_id: team_id }, { blue_id: team_id }] });
|
|
|
+ const matchList = await this.ctx.model.Schedule.find({ match_id, $or: [{ red_id: team_id }, { blue_id: team_id }], is_bye: false });
|
|
|
const res = this.computedTeam(matchList, team_id);
|
|
|
const info = this.getOtherInfoFromList(matchList, team_id);
|
|
|
resList.push({ ...res, ...info });
|
|
|
}
|
|
|
- return resList;
|
|
|
+ return _.orderBy(resList, [ 'win', 'score' ], [ 'desc', 'desc' ]);
|
|
|
}
|
|
|
|
|
|
async ranking() {
|