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

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

@@ -15,13 +15,13 @@ class PatentchatService extends CrudService {
 
   async query({ id, is_read }, { 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 }, { is_read }] }).sort({ 'meta.createdAt': 1 }).skip(parseInt(skip))
       .limit(parseInt(limit));
     return data;
   }
   async count({ id, is_read }) {
     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 }, { is_read }] });
     return data;
   }