Commit dcd0bcdd by weijiguang

push

parent b76e343f
...@@ -226,7 +226,7 @@ public class CouponUserServiceImpl implements ICouponUserService { ...@@ -226,7 +226,7 @@ public class CouponUserServiceImpl implements ICouponUserService {
orderDetail.setRealAmount(orderDetail.getAmountShould().add(orderDetail.getCouponAmount())); orderDetail.setRealAmount(orderDetail.getAmountShould().add(orderDetail.getCouponAmount()));
} else { } else {
orderDetails.forEach(orderDetail -> { orderDetails.forEach(orderDetail -> {
BigDecimal rate = orderDetail.getAmountShould().divide(orderTotalOrigDiscount); BigDecimal rate = orderDetail.getAmountShould().divide(orderTotalOrigDiscount, 2, BigDecimal.ROUND_HALF_UP);;
orderDetail.setCouponAmount(couponVo.getCouponAmount().negate().multiply(rate)); orderDetail.setCouponAmount(couponVo.getCouponAmount().negate().multiply(rate));
orderDetail.setRealAmount(orderDetail.getAmountShould().add(orderDetail.getCouponAmount())); orderDetail.setRealAmount(orderDetail.getAmountShould().add(orderDetail.getCouponAmount()));
log.info("rate:{},detail:{}", rate, JSON.toJSON(orderDetail)); log.info("rate:{},detail:{}", rate, JSON.toJSON(orderDetail));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment