zs 1 月之前
父節點
當前提交
36faf99549
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/controller/match/matchExt.controller.ts

+ 6 - 5
src/controller/match/matchExt.controller.ts

@@ -216,13 +216,14 @@ export class MatchExtController implements BaseController {
     const { data } = await this.matchRegService.query({ match_id, ext_status: '3', status: '0' });
     const fillList = [];
     for (const i of data) {
-      const 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 = await this.matchRegService.dealData(newItem);
       fillList.push(newItem);
     }
     return fillList;
@@ -676,12 +677,12 @@ export class MatchExtController implements BaseController {
    */
   @Post('/lastList/:match_id', { routerName: '赛事决赛名单' })
   async lastList(@Param('match_id') match_id: string) {
-    const list = await this.matchRegService.getArrangeList(match_id)
-    const newList = []
+    const list = await this.matchRegService.getArrangeList(match_id);
+    const newList = [];
     for (const i of list) {
-      let newItem = cloneDeep(i)
+      let newItem = cloneDeep(i);
       newItem = await this.matchRegService.dealData(newItem);
-      newList.push(newItem)
+      newList.push(newItem);
     }
     return newList;
   }