lrf 2 سال پیش
والد
کامیت
f3e6229a18
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      app/service/shop/goodsJoinAct.js

+ 2 - 1
app/service/shop/goodsJoinAct.js

@@ -117,7 +117,8 @@ class GoodsJoinActService extends CrudService {
         as: 'goods_prototype',
       },
     });
-    pipeline.push({ $match: { 'goods_prototype.length': { $gt: 0 } } });
+    pipeline.push({ $addFields: { gp_length: { $size: '$goods_prototype' } } });
+    pipeline.push({ $match: { gp_length: { $gt: 0 } } });
     pipeline.push({
       $project: {
         meta: 1,