|
@@ -326,7 +326,7 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
}
|
|
|
|
|
|
// 格式化 totalPrice 和 subtotal 为两位小数
|
|
|
- totalPrice = totalPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ totalPrice = totalPrice.setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
String formattedTotalPrice = totalPrice.toString(); // 直接使用 toString() 保留两位小数
|
|
|
String formattedSubtotal = totalPrice.toString(); // 小计与总价相同
|
|
|
result.setTotalPrice(new BigDecimal(formattedTotalPrice)); // 设置格式化后的 totalPrice
|