ruifeng_liu 3 년 전
부모
커밋
2bb9cd2f0f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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;