lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
1211d1cd06
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
   }