lrf il y a 2 ans
Parent
commit
91330ecc68
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      app/service/teamApply.js

+ 9 - 0
app/service/teamApply.js

@@ -83,6 +83,15 @@ class TeamApplyService extends CrudService {
     return rs;
   }
 
+  async count(filter) {
+    let condition = _.cloneDeep(filter);
+    condition = await this.beforeQuery(condition);
+    condition = this.dealFilter(condition);
+    condition = this.selfQueryDeal(condition);
+    const count = await this.model.count(condition);
+    return count;
+  }
+
   selfQueryDeal(condition) {
     if (_.get(condition, 'user_id')) {
       const user_id = _.get(condition, 'user_id');