From 38bf3e3d921e24d9dd351549256eb167baaa5b60 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 12 Jun 2024 13:58:21 +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 --- .../main/java/com/hai/service/impl/HighGasServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java index 0942b606..11de5822 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java @@ -114,7 +114,7 @@ public class HighGasServiceImpl implements HighGasService { highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); - + highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); // 油品类型 1:汽油:2:柴油;3:天然气 if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { highGasOilPrice.setOilType(1); @@ -146,11 +146,12 @@ public class HighGasServiceImpl implements HighGasService { } } else { + highGasOilPrice.setPreferentialMargin(highGasOilPrice.getPreferentialMargin()!=null?highGasOilPrice.getPreferentialMargin():new BigDecimal("0")); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); - highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(highGasOilPrice.getPreferentialMargin())); highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount"));