lrf 2 سال پیش
والد
کامیت
589770a0f6
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      app/service/view/order.js

+ 1 - 1
app/service/view/order.js

@@ -46,8 +46,8 @@ class OrderService extends CrudService {
     ];
     pipeline.push(...step2);
     pipeline.push({ $unwind: '$data' });
-    pipeline.push({ $match: { customer } });
     pipeline.push({ $replaceRoot: { newRoot: '$data' } });
+    pipeline.push({ $match: { customer } });
     const qp = _.cloneDeep(pipeline);
     qp.push({ $sort: { 'meta.createdAt': -1 } });
     if (skip && limit) qp.push({ $skip: parseInt(skip) }, { $limit: parseInt(limit) });