guhongwei 3 years ago
parent
commit
e02cf9cbd0
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/service/patent/patentchat.js

+ 4 - 4
app/service/patent/patentchat.js

@@ -13,15 +13,15 @@ class PatentchatService extends CrudService {
     this.model = this.ctx.model.Patent.Patentchat;
   }
 
-  async query({ id }, { skip = 0, limit = 0, is_read } = {}) {
+  async query({ id }, { skip = 0, limit = 0 } = {}) {
     assert(id, '缺少用户信息');
-    const data = await this.model.find({ $or: [{ sender_id: id }, { receiver_id: id }, { is_read }] }).sort({ 'meta.createdAt': 1 }).skip(parseInt(skip))
+    const data = await this.model.find({ $or: [{ sender_id: id }, { receiver_id: id }] }).sort({ 'meta.createdAt': 1 }).skip(parseInt(skip))
       .limit(parseInt(limit));
     return data;
   }
-  async count({ id, is_read }) {
+  async count({ id }) {
     assert(id, '缺少用户信息');
-    const data = await this.model.count({ $or: [{ sender_id: id }, { receiver_id: id }, { is_read }] });
+    const data = await this.model.count({ $or: [{ sender_id: id }, { receiver_id: id }] });
     return data;
   }