lrf há 2 anos atrás
pai
commit
1211d1cd06
1 ficheiros alterados com 1 adições e 1 exclusões
  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;
   }