|
@@ -483,15 +483,22 @@ export class MatchExtController implements BaseController {
|
|
|
*/
|
|
|
// await this.service.checkMatchExtStatus(match_id, '5');
|
|
|
// 决赛名单,根据顺序升序
|
|
|
- const final_confirm = get(query, 'final_confirm')
|
|
|
- const { data: list } = await this.matchRegService.query({ match_id, ext_status: '5', final_confirm }, { order: { final_order_no: 'ASC' } });
|
|
|
- const newList = []
|
|
|
+ const final_confirm = get(query, 'final_confirm');
|
|
|
+ const ext_status = get(query, 'ext_status');
|
|
|
+ const { data: list } = await this.matchRegService.query({ match_id, ext_status, final_confirm }, { order: { final_order_no: 'ASC' } });
|
|
|
+ const fillList = [];
|
|
|
for (const i of list) {
|
|
|
- let newItem = cloneDeep(i)
|
|
|
+ let newItem = cloneDeep(i);
|
|
|
+ const user_id = get(i, 'user_id');
|
|
|
+ const user = await this.userService.fetch({ id: user_id });
|
|
|
+ if (user) newItem.user_name = get(user, 'nick_name');
|
|
|
+ const match_id = get(i, 'match_id');
|
|
|
+ const match = await this.matchService.fetch({ id: match_id });
|
|
|
+ if (match) newItem.match_name = get(match, 'name');
|
|
|
newItem = this.matchRegService.dealData(newItem);
|
|
|
- newList.push(newItem)
|
|
|
+ fillList.push(newItem);
|
|
|
}
|
|
|
- return newList;
|
|
|
+ return fillList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -665,7 +672,7 @@ export class MatchExtController implements BaseController {
|
|
|
/**
|
|
|
* 人为规定的决赛实时名单
|
|
|
* @param match_id 赛事id
|
|
|
- * @returns
|
|
|
+ * @returns
|
|
|
*/
|
|
|
@Post('/lastList/:match_id', { routerName: '赛事决赛名单' })
|
|
|
async lastList(@Param('match_id') match_id: string) {
|