|
@@ -442,7 +442,7 @@ class PatentinfoService extends CrudService {
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
- async mechQuery(query) {
|
|
|
+ async mechQuery({ skip = 0, limit = 0, ...query }) {
|
|
|
const code = _.get(query, 'code');
|
|
|
assert(code, '缺少机构信息!');
|
|
|
const { empower_sort, ...others } = query;
|
|
@@ -452,7 +452,8 @@ class PatentinfoService extends CrudService {
|
|
|
if (empower_sort === '0') {
|
|
|
sort = 'asc';
|
|
|
}
|
|
|
- const data = await this.model.find(newQuery).sort({ empower_date: sort });
|
|
|
+ const data = await this.model.find(newQuery).sort({ empower_date: sort }).skip(parseInt(skip))
|
|
|
+ .limit(parseInt(limit));
|
|
|
const total = await this.model.count(newQuery);
|
|
|
return { data, total };
|
|
|
}
|