Ver Fonte

专利信息过滤数据bug

guhongwei há 3 anos atrás
pai
commit
3915d35503
1 ficheiros alterados com 6 adições e 2 exclusões
  1. 6 2
      app/service/patent/patentinfo.js

+ 6 - 2
app/service/patent/patentinfo.js

@@ -33,9 +33,13 @@ class PatentinfoService extends CrudService {
     this.export_limit = 50;
   }
 
-  async query(query, { skip = 0, limit = 0 }) {
+  async query(query, { skip = 0, limit = 0, projection }) {
     const newquery = await this.resetCode(query);
-    const res = await this.model.find(newquery).skip(parseInt(skip)).limit(parseInt(limit)).sort({ create_date: -1 });
+    const res = await this.model
+      .find(newquery, projection)
+      .skip(parseInt(skip))
+      .limit(parseInt(limit))
+      .sort({ create_date: -1 });
     return res;
   }
   async count(query) {