ruifeng_liu 3 years ago
parent
commit
2bb9cd2f0f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/service/statistics/index.js

+ 2 - 2
app/service/statistics/index.js

@@ -395,9 +395,9 @@ class IndexService extends CrudService {
 
 
     const patentInfo = this.ctx.model.Patent.Patentinfo;
-    const information = await patentInfo.count({ user_id: [ ObjectId(id) ] });
+    const information = await patentInfo.count({ user_id: { $elemMatch: { $in: [ ObjectId(id) ] } } });
     const patentEarly = this.ctx.model.Patent.Patentearly;
-    const early = await patentEarly.count({ user_id: [ ObjectId(id) ] });
+    const early = await patentEarly.count({ user_id: { $elemMatch: { $in: [ ObjectId(id) ] } } });
 
 
     const patentTrans = this.ctx.model.Patent.Patenttrans;