lrf 2 anni fa
parent
commit
65b447d97a
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      app/service/shop/goodsJoinAct.js

+ 13 - 0
app/service/shop/goodsJoinAct.js

@@ -59,6 +59,19 @@ class GoodsJoinActService extends CrudService {
         as: 'shopInfo',
       },
     });
+    pipeline.push({
+      $project: {
+        shop: 1,
+        shop_name: { $first: '$shopInfo.name' },
+        goods: '$goods._id',
+        goods_name: '$goods.name',
+        spec: '$spec._id',
+        spec_name: '$spec.name',
+        sell_money: { $toString: '$spec.sell_money' },
+        platform_act_type: 1,
+        status: 1,
+      },
+    });
     const qPipeline = _.cloneDeep(pipeline);
     if (parseInt(skip)) qPipeline.push({ $skip: parseInt(skip) });
     if (parseInt(limit)) qPipeline.push({ $limit: parseInt(limit) });