liuyu 5 years ago
parent
commit
afe9f4396d
2 changed files with 3 additions and 3 deletions
  1. 1 1
      app/controller/personroomtalk.js
  2. 2 2
      app/service/personroomtalk.js

+ 1 - 1
app/controller/personroomtalk.js

@@ -16,7 +16,7 @@ class PersonroomtalkController extends Controller {
   }
 
   async countroom() {
-    const res = await this.service.countroom(this.ctx.query);
+    const res = await this.service.countroom();
     this.ctx.ok({ total: res });
   }
 }

+ 2 - 2
app/service/personroomtalk.js

@@ -17,8 +17,8 @@ class PersonroomService extends CrudService {
     return talk.delete();
   }
 
-  async countroom(query) {
-    const total = await this.model.count({ pr_id: query.qr_id });
+  async countroom() {
+    const total = await this.model.count();
     return total;
   }
 }