lrf 2 years ago
parent
commit
496c2a4682
1 changed files with 14 additions and 1 deletions
  1. 14 1
      app/service/matchTeamGroup.js

+ 14 - 1
app/service/matchTeamGroup.js

@@ -14,6 +14,19 @@ class MatchTeamGroupService extends CrudService {
     this.matchSignModel = this.ctx.model.Race.MatchSign;
     this.baseUserModel = this.ctx.model.Base.User;
   }
+  /**
+   * 根据项目和选手类型查询可选择的分组人员
+   * @param {Object} query 地址栏查询条件
+   * @property {String} project_id 比赛项目id
+   * @property {String} person_type 选手类型
+   * @property {String} team_id 小组id
+   */
+  async findGroupPersonSelects({ project_id, person_type, team_id }) {
+    // 1.查找所有报名的选手/小队
+
+    // 2.查找该项目下已经分完组的成员
+  }
+
 
   // 将选手的信息换出来
   async afterQuery(filter, data) {
@@ -50,7 +63,7 @@ class MatchTeamGroupService extends CrudService {
     if (type === '1') {
       // 双打,找到这个项目所有的申请,且审核通过的
       obj.person_type = 'TeamApply';
-      const teamApplys = await this.teamApplyModel.find({ project_id, pay_status: '1' });
+      const teamApplys = await this.teamApplyModel.find({ project_id, status: '1' });
       personList = JSON.parse(JSON.stringify(teamApplys));
     } else {
       // 单打,找到这个项目所有申请报名的信息