lrf402788946 4 năm trước cách đây
mục cha
commit
eb273133d9
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      app/service/doctormoney.js

+ 3 - 3
app/service/doctormoney.js

@@ -14,10 +14,10 @@ class DoctorMoneyService extends CrudService {
     this.cPatient = this.ctx.model.Patient;
   }
 
-  async query({ doctorid }, { skip, limit }) {
+  async query({ doctorid, ...query }, { skip, limit }) {
     assert(doctorid, 'doctorid不能为空');
-    const moneyall = await this.model.find({ doctorid });
-    const moneys = await this.model.find({ doctorid }).sort({ sendtime: -1 }).limit(limit)
+    const moneyall = await this.model.find({ doctorid, ...query });
+    const moneys = await this.model.find({ doctorid, ...query }).sort({ sendtime: -1 }).limit(limit)
       .skip(skip);
     const newmoneys = [];
     for (const el of moneys) {