折扣比例
This commit is contained in:
parent
615f32d32d
commit
f4ad2415b0
|
|
@ -695,7 +695,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
orderInfo.setDiscountInfo(buildDiscountInfo(orderInfo));
|
||||
//最终折扣
|
||||
if (param.getOrderAmount().compareTo(BigDecimal.ZERO) != 0) {
|
||||
orderInfo.setDiscountRatio(orderInfo.getOriginAmount().divide(param.getOrderAmount(), 2, RoundingMode.UP));
|
||||
orderInfo.setDiscountRatio(orderInfo.getOrderAmount().divide(param.getOriginAmount(), 2, RoundingMode.UP));
|
||||
} else {
|
||||
orderInfo.setDiscountRatio(BigDecimal.ZERO);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue