zs 1 year ago
parent
commit
fa97890590
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/service/teamApply.service.ts

+ 2 - 3
src/service/teamApply.service.ts

@@ -41,9 +41,8 @@ export class TeamApplyService extends BaseService<modelType> {
         );
         );
       }
       }
       // 检查比赛人员申请
       // 检查比赛人员申请
-      const applyan = await this.model.count({
-        apply_id: data.apply_id,
-        status: '1',
+      const applyan = await this.TeamModel.count({
+        member: { $in: [data.apply_id] },
       });
       });
       if (applyan > 0)
       if (applyan > 0)
         throw new ServiceError(
         throw new ServiceError(