From cda982993b0d4296db7d5d6f6a7aeebb0edfb417 Mon Sep 17 00:00:00 2001 From: wst <2450473462@qq.com> Date: Fri, 6 Dec 2024 21:52:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AE=A1=E7=AE=97=E7=99=BE=E5=88=86=E6=AF=94?= =?UTF-8?q?=E6=8A=98=E6=89=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/skyeye/order/service/impl/OrderServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skyeye-shop/shop-store/src/main/java/com/skyeye/order/service/impl/OrderServiceImpl.java b/skyeye-shop/shop-store/src/main/java/com/skyeye/order/service/impl/OrderServiceImpl.java index 5b819106..d3549f18 100644 --- a/skyeye-shop/shop-store/src/main/java/com/skyeye/order/service/impl/OrderServiceImpl.java +++ b/skyeye-shop/shop-store/src/main/java/com/skyeye/order/service/impl/OrderServiceImpl.java @@ -223,13 +223,13 @@ public class OrderServiceImpl extends SkyeyeBusinessServiceImpl // 折扣上限的折后价 String limitPrice = CalculationUtil.subtract(targetOrderItem.getPrice(), discountLimitPrice, CommonNumConstants.NUM_SIX); // 是否超过折扣上限 - boolean priceCompare = CalculationUtil.getMax(percentDiscountPrice, discountLimitPrice, CommonNumConstants.NUM_SIX).equals(percentDiscountPrice); + String highPrice = CalculationUtil.getMax(percentDiscountPrice, discountLimitPrice, CommonNumConstants.NUM_SIX); // 设置应支付价格和优惠价格 - if (priceCompare) { // 未超过优惠价 + if (Double.parseDouble(highPrice) == Double.parseDouble(discountLimitPrice)) { // 未超过优惠价 item.setPayPrice(percentPrice); item.setCouponPrice(percentDiscountPrice); // 修改总单总价 - order.setPayPrice(CalculationUtil.subtract(order.getPayPrice(), discountPercentInt, CommonNumConstants.NUM_SIX)); + order.setPayPrice(CalculationUtil.subtract(order.getPayPrice(), percentDiscountPrice, CommonNumConstants.NUM_SIX)); order.setCouponPrice(percentDiscountPrice); } else {// 超过优惠价 item.setPayPrice(limitPrice);