From 9b7dcaaf7cec9e761736c158b0911f710f8c63f7 Mon Sep 17 00:00:00 2001 From: 199901012 Date: Wed, 24 Mar 2021 11:57:00 +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 --- .../HighMerchantStoreController.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 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 309d3eb0..1aeac46b 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java @@ -33,6 +33,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -109,8 +110,15 @@ public class HighMerchantStoreController { } Map regionMap = commonService.getParentInfoByRegionId(highMerchantStore.getRegionId()); - highMerchantStore.setRegionId(regionMap.get("city").getRegionId()); - highMerchantStore.setRegionName(regionMap.get("city").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()); + } highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setStatus(1); // 状态:0:删除,1:正常 @@ -182,8 +190,15 @@ public class HighMerchantStoreController { } Map regionMap = commonService.getParentInfoByRegionId(highMerchantStore.getRegionId()); - highMerchantStore.setRegionId(regionMap.get("city").getRegionId()); - highMerchantStore.setRegionName(regionMap.get("city").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()); + } highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setOperatorId(userInfoModel.getSecUser().getId()); highMerchantStore.setOperatorName(userInfoModel.getSecUser().getUserName());