订单金额问题

This commit is contained in:
wangw 2025-03-05 14:44:59 +08:00
parent e3833b8bfc
commit f7e30439b7
1 changed files with 1 additions and 1 deletions

View File

@ -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.getOrderAmount().divide(param.getOriginAmount(), 2, RoundingMode.UP));
orderInfo.setDiscountRatio(orderInfo.getOrderAmount().divide(orderInfo.getOriginAmount(), 2, RoundingMode.UP));
} else {
orderInfo.setDiscountRatio(BigDecimal.ZERO);
}