瀏覽代碼

对接关注

chen 5 年之前
父節點
當前提交
e463bb362f
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      app/service/intelligentFollow.js

+ 6 - 1
app/service/intelligentFollow.js

@@ -84,7 +84,8 @@ class IntelligentFollowService extends CrudService {
         localField: 'intelligentId',
         localField: 'intelligentId',
         foreignField: '_id',
         foreignField: '_id',
         as: 'intelligent' } },
         as: 'intelligent' } },
-      { $unwind: '$intelligent' },
+      // { $unwind: '$intelligent' },
+      { $unwind: { path: '$intelligent', preserveNullAndEmptyArrays: true } },
 
 
       { $project:
       { $project:
           {
           {
@@ -136,6 +137,10 @@ class IntelligentFollowService extends CrudService {
                 as: 'dictionary',
                 as: 'dictionary',
               },
               },
       },
       },
+      { $unwind: { path: '$company', preserveNullAndEmptyArrays: true } },
+      { $unwind: { path: '$institution', preserveNullAndEmptyArrays: true } },
+      { $unwind: { path: '$finance_claims', preserveNullAndEmptyArrays: true } },
+      { $unwind: { path: '$dictionary', preserveNullAndEmptyArrays: true } },
       { $skip: (skip - 1) * limit },
       { $skip: (skip - 1) * limit },
       { $limit: limit },
       { $limit: limit },
       { $sort: { time: -1 } },
       { $sort: { time: -1 } },