zs 5 hónapja
szülő
commit
24056bbf11
1 módosított fájl, 16 hozzáadás és 8 törlés
  1. 16 8
      src/service/match/matchRegistration.service.ts

+ 16 - 8
src/service/match/matchRegistration.service.ts

@@ -14,20 +14,28 @@ export class MatchRegistrationService extends BaseServiceV2 {
    * @param match_id 赛事id
    */
   async getArrangeList(match_id) {
-    const { data: list, total } = await this.query({ match_id, order: { final_score: "DESC" } });
+    const { data: list } = await this.query({ match_id, ext_status: '8' }, { order: { final_score: 'DESC' } });
     /**有指定最终排名的数据 */
-    const orderList = orderBy(list.filter(f => f.last_order_no), ['last_order_no'], ['asc'])
+    const orderList = orderBy(
+      list.filter(f => f.last_order_no),
+      ['last_order_no'],
+      ['asc']
+    );
     /**没有指定最终排名的数据 */
-    const freeOrderList = orderBy(list.filter(f => !f.last_order_no), ['final_score'], ['desc'])
+    const freeOrderList = orderBy(
+      list.filter(f => !f.last_order_no),
+      ['final_score'],
+      ['desc']
+    );
     for (const i of orderList) {
-      const no = get(i, 'last_order_no')
-      if (!no || no <= 0) continue
-      const index = no - 1
-      freeOrderList.splice(index, 0, i)
+      const no = get(i, 'last_order_no');
+      if (!no || no <= 0) continue;
+      const index = no - 1;
+      freeOrderList.splice(index, 0, i);
     }
     for (let i = 0; i < freeOrderList.length; i++) {
       const item = freeOrderList[i];
-      item.show_order = i + 1
+      item.show_order = i + 1;
     }
     return freeOrderList;
   }