|
@@ -17,6 +17,7 @@ class PatentnoticeService extends CrudService {
|
|
|
|
|
|
async query(query, { skip = 0, limit = 0 } = 0) {
|
|
|
query = await this.resetQuery(query);
|
|
|
+ console.log(query);
|
|
|
const data = await this.model.find(query).skip(parseInt(skip)).limit(parseInt(limit))
|
|
|
.sort({ 'meta.createdAt': -1 });
|
|
|
return data;
|
|
@@ -70,7 +71,7 @@ class PatentnoticeService extends CrudService {
|
|
|
const p1 = await this.getOrgUser(admin.code);
|
|
|
const p2 = await this.getOrgUser(org.map(i => i.code));
|
|
|
let ids = [ ...p1.map(i => i._id), ...p2.map(i => i._id) ];
|
|
|
- if (to_type === 0) {
|
|
|
+ if (to_type === '0') {
|
|
|
ids = [ ...ids, ...org.map(i => i._id) ];
|
|
|
}
|
|
|
object = { send_id, send_name, to_type, to_id: ids, content };
|