From d662e316dbe61d85670df6904684334e0b6cca56 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 19 May 2022 17:14:45 +0800 Subject: [PATCH 1/4] =?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 --- .../controller/HighMerchantStoreController.java | 16 +++++++++++----- .../HighMerchantStoreAccountServiceImpl.java | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java index 9579ac08..3be2c75a 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java @@ -97,13 +97,19 @@ public class HighMerchantStoreController { } Map regionMap = commonService.getParentInfoByRegionId(highMerchantStore.getRegionId()); - // 如果是重庆市的区县,使用重庆市的区域代码 - if (regionMap.get("region").getRegionId().intValue() == 500100) { + + if (highMerchantStore.getType() != null && highMerchantStore.getType().equals(1)) { highMerchantStore.setRegionId(regionMap.get("region").getParentId()); - highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); + highMerchantStore.setRegionName(commonService.getRegionName(regionMap.get("region").getParentId())); } else { - highMerchantStore.setRegionId(regionMap.get("region").getRegionId()); - highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); + // 如果是重庆市的区县,使用重庆市的区域代码 + if (regionMap.get("region").getRegionId().intValue() == 500100) { + highMerchantStore.setRegionId(regionMap.get("region").getParentId()); + highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); + } else { + highMerchantStore.setRegionId(regionMap.get("region").getRegionId()); + highMerchantStore.setRegionName(regionMap.get("region").getRegionName()); + } } if (highMerchantStore.getBrandId() != null) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreAccountServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreAccountServiceImpl.java index e4a5f2ad..efb2ee93 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreAccountServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreAccountServiceImpl.java @@ -136,13 +136,15 @@ public class HighMerchantStoreAccountServiceImpl implements HighMerchantStoreAcc // 是否开通了账户 HighMerchantStoreAccount account = getStoreAccountDetail(storeId); if (account == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); + account = new HighMerchantStoreAccount(); + account.setStoreId(storeId); + account.setAmounts(new BigDecimal("0")); + editStoreAccount(account); } // 账户余额 是否小于 出账余额 if (account.getAmounts().compareTo(amount) == -1) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); } - // 变更前金额 BigDecimal beforeAmount = account.getAmounts(); // 计算金额 From 2db01ba98ca332242634af94028afadaa27b70a9 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 19 May 2022 18:01:08 +0800 Subject: [PATCH 2/4] =?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 --- .../com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java index 3e19dab1..0a18956a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java @@ -74,7 +74,6 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici JSONArray oilArray = resBody.getJSONArray("list"); for (Object oil : oilArray) { JSONObject oilObject = (JSONObject) oil; - System.out.println(); SecRegion region = commonService.getRegionsByName(oilObject.getString("prov")); if (region != null) { From bd7c2c5f99f22d630c7f28284f3aff765a0cb82e Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 20 May 2022 09:21:12 +0800 Subject: [PATCH 3/4] =?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 --- .../hai/service/impl/HighGasDiscountOilPriceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5a77d3fc..549c908e 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 @@ -191,7 +191,7 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri payPriceModel.setOilLiters(oilingPrice.divide(priceGun, 2, BigDecimal.ROUND_HALF_DOWN)); // 平台折扣,我们平台或者代理商设置的折扣 - payPriceModel.setDiscount(discount.compareTo(new BigDecimal("100")) == 1 ? new BigDecimal("0") : discount); + payPriceModel.setDiscount(discount.compareTo(new BigDecimal("1.00")) == 0 ? new BigDecimal("0") : discount); // 加油补贴, 计算方式:团油枪价 - 团油VIP价 payPriceModel.setOilSubsidy(priceGun.subtract(priceVip)); From 86f186078bbd34928deb62be70a483acd9e9eaf2 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 20 May 2022 09:28:06 +0800 Subject: [PATCH 4/4] =?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 --- .../java/com/cweb/controller/HighGasController.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java index b166831d..731a2793 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java @@ -92,10 +92,12 @@ public class HighGasController { if (region != null) { List> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,region.getRegionId(), oilNoName); for (Map store : storeList) { - if (StringUtils.isNotBlank(MapUtils.getString(store, "store_logo"))) { - store.put("store_logo", CommonSysConst.getSysConfig().getHsgDomainName() +"/filesystem/"+MapUtils.getString(store, "store_logo")); - } else { - store.put("store_logo", null); + if (MapUtils.getInteger(store, "source_type").equals(1)) { + if (StringUtils.isNotBlank(MapUtils.getString(store, "store_logo"))) { + store.put("store_logo", CommonSysConst.getSysConfig().getHsgDomainName() +"/filesystem/"+MapUtils.getString(store, "store_logo")); + } else { + store.put("store_logo", null); + } } double distance = CoordCommonUtil.getDistance(Double.valueOf(store.get("latitude").toString()), Double.valueOf(store.get("longitude").toString()), Double.valueOf(latitude), Double.valueOf(longitude)); store.put("distance", Math.round(distance/100d)/10d);