lrf 2 år sedan
förälder
incheckning
1211d1cd06
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      app/service/matchSign.js

+ 1 - 1
app/service/matchSign.js

@@ -30,7 +30,7 @@ class MatchSignService extends CrudService {
   async checkHas(body) {
     const { match_id, group_id, project_id, user_id } = body;
     const query = { match_id, group_id, project_id, user_id, pay_status: [ '0', '1' ] };
-    const num = await this.model.query(query);
+    const num = await this.model.count(query);
     if (num > 0) throw new BusinessError(ErrorCode.DATA_EXISTED, '您已报名');
     return true;
   }