Commit 1c2610b4 by weijiguang

test

parent f3e5195a
......@@ -224,9 +224,9 @@ public class CouponUserServiceImpl implements ICouponUserService {
orderDetail.setRealAmount(orderDetail.getAmountShould().add(orderDetail.getCouponAmount()));
} else {
orderDetails.forEach(orderDetail -> {
BigDecimal rate = orderDetail.getAmountShould().divide(orderTotalOrigDiscount);
BigDecimal rate = orderDetail.getAmountShould().divide(new BigDecimal(orderDetail.getNum())).divide(orderTotalOrigDiscount);
orderDetail.setCouponAmount(couponVo.getCouponAmount().multiply(rate));
orderDetail.setRealAmount(orderDetail.getAmountShould().add(orderDetail.getCouponAmount()));
orderDetail.setRealAmount(orderDetail.getAmountShould().divide(new BigDecimal(orderDetail.getNum())).add(orderDetail.getCouponAmount()));
});
}
} 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