lrf402788946 4 年之前
父節點
當前提交
7401e1e1ff
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/service/patient.js

+ 3 - 3
app/service/patient.js

@@ -16,10 +16,10 @@ class PatientService extends CrudService {
     this.chatModel = this.ctx.model.Chat;
   }
 
-  async query({ doctorid }, { skip, limit }) {
+  async query({ doctorid, ...query }, { skip, limit }) {
     assert(doctorid, 'doctorid不能为空');
-    const pdocall = await this.pDocs.find({ doctorid });
-    const pdoc = await this.pDocs.find({ doctorid }).limit(limit).skip(skip);
+    const pdocall = await this.pDocs.find({ doctorid, ...query });
+    const pdoc = await this.pDocs.find({ doctorid, ...query }).limit(limit).skip(skip);
     const patients = [];
     for (const el of pdoc) {
       const patient = await this.model.findById(el.patientid);