|
@@ -257,8 +257,7 @@ module.exports = class extends Base {
|
|
}
|
|
}
|
|
|
|
|
|
// 统计商品总价
|
|
// 统计商品总价
|
|
- const orderGoodsData = [];
|
|
|
|
- orderGoodsData.push({
|
|
|
|
|
|
+ const orderGoodsData = {
|
|
order_id: orderId,
|
|
order_id: orderId,
|
|
goods_id: checkedGoodsId,
|
|
goods_id: checkedGoodsId,
|
|
goods_sn: checkedGoods.goods_sn,
|
|
goods_sn: checkedGoods.goods_sn,
|
|
@@ -270,9 +269,11 @@ module.exports = class extends Base {
|
|
number: this.post('goodsCount'),
|
|
number: this.post('goodsCount'),
|
|
goods_specifition_name_value: checkedGoods.goods_specifition_name_value,
|
|
goods_specifition_name_value: checkedGoods.goods_specifition_name_value,
|
|
goods_specifition_ids: checkedGoods.goods_specifition_ids
|
|
goods_specifition_ids: checkedGoods.goods_specifition_ids
|
|
- });
|
|
|
|
|
|
+ };
|
|
|
|
|
|
- await this.model('order_goods').addMany(orderGoodsData);
|
|
|
|
|
|
+ if (checkedGoods.promotion_desc.length > 0) orderGoodsData.goods_type = 100;
|
|
|
|
+
|
|
|
|
+ await this.model('order_goods').addMany([orderGoodsData]);
|
|
|
|
|
|
return this.success({ orderInfo: orderInfo });
|
|
return this.success({ orderInfo: orderInfo });
|
|
}
|
|
}
|