@@ -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,