|
@@ -556,6 +556,8 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
AtomicDouble shopPromotionFee = new AtomicDouble(0);
|
|
|
// 供应商超级会员优惠
|
|
|
AtomicDouble svipShopReduction = new AtomicDouble(0);
|
|
|
+ // 商品的单品满减优惠金额
|
|
|
+ AtomicDouble singlePromotionFee = new AtomicDouble(0);
|
|
|
|
|
|
// 遍历所有商品
|
|
|
for (Object productObject : productArr) {
|
|
@@ -774,13 +776,13 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
Double floor = Math.floor(MathUtil.div(productFee, promotions.getTouchPrice()).doubleValue());
|
|
|
promotionFullReduction.set(MathUtil.add(promotionFullReduction.get(), MathUtil.mul(promotions.getReducedPrice(), floor)).doubleValue());
|
|
|
productFee = MathUtil.sub(productFee, MathUtil.mul(promotions.getReducedPrice(), floor)).doubleValue();
|
|
|
- shopOrder.setPromotionFullReduction(MathUtil.mul(promotions.getReducedPrice(), floor).doubleValue());
|
|
|
+ singlePromotionFee.set(MathUtil.add(singlePromotionFee.get(),MathUtil.mul(promotions.getReducedPrice(), floor)).doubleValue());
|
|
|
} else {
|
|
|
// 统计订单总满减金额
|
|
|
promotionFullReduction.set(MathUtil.add(promotionFullReduction.get(), promotions.getReducedPrice()).doubleValue());
|
|
|
// 统计单个商品的折后金额
|
|
|
productFee = MathUtil.sub(productFee, promotions.getReducedPrice()).doubleValue();
|
|
|
- shopOrder.setPromotionFullReduction(promotions.getReducedPrice());
|
|
|
+ singlePromotionFee.set(MathUtil.add(singlePromotionFee.get(),promotions.getReducedPrice()).doubleValue());
|
|
|
}
|
|
|
}
|
|
|
// 添加到总促销
|