|
@@ -38,7 +38,6 @@ class PatentService extends CrudService {
|
|
|
}
|
|
|
async count(query) {
|
|
|
query = await this.resetCode(query);
|
|
|
- console.log(query);
|
|
|
const res = await this.model.countDocuments(trimData(query)).exec();
|
|
|
return res;
|
|
|
}
|
|
@@ -58,8 +57,8 @@ class PatentService extends CrudService {
|
|
|
const olist = await this.organizationModel.find({ code });
|
|
|
ids = [ ...ids, ...olist.map(i => i._id) ];
|
|
|
}
|
|
|
- if (ids.lenght > 0) {
|
|
|
- query.user_id = { $elemMatch: ids };
|
|
|
+ if (ids.length > 0) {
|
|
|
+ query.user_id = { $elemMatch: { $in: ids } };
|
|
|
delete query.code;
|
|
|
}
|
|
|
return query;
|