提交代码

master
胡锐 6 months ago committed by yuanye
parent 6b1f35efe7
commit d39ef83b2a
  1. 2
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
  2. 9
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -174,7 +174,7 @@ public class OrderPaySuccessService {
orderCoupon.setPayTime(order.getPayTime());
orderCouponService.editData(orderCoupon);
// 增加销量
/// 增加销量
goodsMsgService.editSaleNum(childOrder.getProductId(), childOrder.getProductCount(), 1);
// 子订单完成

@ -224,15 +224,18 @@ public class BsOrderServiceImpl implements BsOrderService {
childOrder.setSurplusRefundPrice(
// 商品总金额 - 积分抵扣金额
childOrder.getProductTotalPrice().subtract(
new BigDecimal(childOrder.getSurplusRefundIntegral().toString()).multiply(new BigDecimal("100"))
new BigDecimal(childOrder.getSurplusRefundIntegral().toString()).divide(new BigDecimal("100"))
));
}
childOrder.setCouponDiscountPrice(childOrder.getProductTotalPrice().subtract(childOrder.getSurplusRefundPrice()));
childOrder.setCouponDiscountPrice(
childOrder.getSurplusRefundPrice().compareTo(BigDecimal.ZERO) == 1
? childOrder.getProductTotalPrice().subtract(childOrder.getSurplusRefundPrice())
: childOrder.getSurplusRefundPrice());
childOrder.setIntegralDiscountPrice(childOrder.getSurplusRefundIntegral());
childOrder.setTotalDeductionPrice(
childOrder.getCouponDiscountPrice()
.add(new BigDecimal(childOrder.getIntegralDiscountPrice().toString()).multiply(new BigDecimal("100")))
.add(new BigDecimal(childOrder.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100")))
);
childOrder.setProductActualPrice(childOrder.getProductTotalPrice().subtract(childOrder.getTotalDeductionPrice()));
orderChildService.editData(childOrder);

Loading…
Cancel
Save