|
@@ -4,6 +4,7 @@ const { BusinessError, ErrorCode } = require('naf-core').Error;
|
|
|
const _ = require('lodash');
|
|
|
const assert = require('assert');
|
|
|
const { trimData } = require('naf-core').Util;
|
|
|
+const { ObjectId } = require('mongoose').Types;
|
|
|
|
|
|
// 通知
|
|
|
class PatentnoticeService extends CrudService {
|
|
@@ -30,7 +31,7 @@ class PatentnoticeService extends CrudService {
|
|
|
async resetQuery(condition) {
|
|
|
const { to_id } = condition;
|
|
|
if (to_id) {
|
|
|
- condition.to_id = { $elemMatch: { $in: [ to_id ] } };
|
|
|
+ condition.to_id = { $elemMatch: { $in: [ ObjectId(to_id) ] } };
|
|
|
}
|
|
|
return condition;
|
|
|
}
|