Commit 385449b2 by weijiguang

test

parent e7652b77
...@@ -231,6 +231,9 @@ public class CouponUserServiceImpl implements ICouponUserService { ...@@ -231,6 +231,9 @@ public class CouponUserServiceImpl implements ICouponUserService {
orderDetails.forEach(orderDetail -> { orderDetails.forEach(orderDetail -> {
BigDecimal couponAmount = couponAmountMap.get(orderDetail.getSkuId()); BigDecimal couponAmount = couponAmountMap.get(orderDetail.getSkuId());
orderDetail.setCouponAmount(couponAmount == null ? BigDecimal.ZERO : couponAmount.negate()); orderDetail.setCouponAmount(couponAmount == null ? BigDecimal.ZERO : couponAmount.negate());
if (orderDetail.getCouponAmount().compareTo(BigDecimal.ZERO) > 0) {
orderDetail.setAmountShould(orderDetail.getOrigDiscount());
}
if (orderDetail.getAmountShould().add(orderDetail.getCouponAmount()).compareTo(BigDecimal.ZERO) < 0) { if (orderDetail.getAmountShould().add(orderDetail.getCouponAmount()).compareTo(BigDecimal.ZERO) < 0) {
orderDetail.setRealAmount(BigDecimal.ZERO); orderDetail.setRealAmount(BigDecimal.ZERO);
} else { } else {
......
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