|
@@ -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) {
|