From 2d860adac43707237b84421f524578b133e84e77 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 2 Aug 2022 13:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/HighGasDiscountOilPriceServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java index f511f5ae..712185d7 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java @@ -198,11 +198,11 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri // 优惠价格 油站VIP价 * 系统折扣 payPriceModel.setPricePreferences(priceVip.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP)); - // 每升优惠 国标价 - 优惠价格 - payPriceModel.setLitersPreferences(payPriceModel.getPriceOfficial().subtract(payPriceModel.getPricePreferences())); + // 每升优惠 油站价 - 优惠价格 + payPriceModel.setLitersPreferences(payPriceModel.getPriceGun().subtract(payPriceModel.getPricePreferences())); // 本次优惠 加油升数 * 每升优惠 - payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_DOWN)); + payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_HALF_UP)); // 支付价格 加油金额 - 本次优惠 payPriceModel.setPayPrice(oilingPrice.subtract(payPriceModel.getTotalPreferences()));