Browse Source

info查询

ruifeng_liu 3 years ago
parent
commit
c3c754a4f1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/service/patent/patentinfo.js

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

@@ -64,10 +64,12 @@ class PatentinfoService extends CrudService {
       const plist = await this.personalModel.find({ code });
       ids = plist.map(i => i._id);
       if (ids.length > 0) {
+        if (!newquery.inventor)newquery.inventor = {};
         newquery.inventor.user_id = { $in: ids };
         delete newquery.code;
       }
     } else if (user_id) {
+      if (!newquery.inventor)newquery.inventor = {};
       newquery.inventor.user_id = { $in: [ ObjectId(user_id) ] };
     }