From ba245b6eeeaf002a9ecfc6c9cb48c11560d4a0ae Mon Sep 17 00:00:00 2001 From: mjt <13607600062@163.com> Date: Wed, 8 May 2024 14:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=89=E5=A4=A7=E6=B6=89=E5=86=9CBUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../open/controllers/GdBankController.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/GdBankController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/GdBankController.java index 046bc4e6e..efc4cb12b 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/GdBankController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/GdBankController.java @@ -89,9 +89,9 @@ public class GdBankController { if (json.containsKey("result")) { //我们的结果 JSONObject result = json.getJSONObject("result"); - if (("是").equals(result.get("countyLevelCity"))){ + if (("是").equals(result.get("countyLevelCity"))) { result.put("prefectureLevelCity", "否"); - } else if(("否").equals(result.get("countyLevelCity"))){ + } else if (("否").equals(result.get("countyLevelCity"))) { result.put("prefectureLevelCity", "是"); } //我们省级及以上有开发区,直接用我们的结果 @@ -116,13 +116,15 @@ public class GdBankController { basicModel.setResult(result); } } else { - if (("是").equals(result.get("countyLevelCity"))){ + if (("是").equals(result.get("countyLevelCity"))) { map.put("prefectureLevelCity", "否"); - } else if(("否").equals(result.get("countyLevelCity"))){ + } else if (("否").equals(result.get("countyLevelCity"))) { map.put("prefectureLevelCity", "是"); } map.put("addrVerify", "地址有效"); - map.put("countyLevelCity",result.getString("countyLevelCity")); + if (result.containsKey("countyLevelCity")) { + map.put("countyLevelCity", result.getString("countyLevelCity")); + } map.put("typeName", areaMap.get(map.get("typeCode"))); basicModel.setResult(map); } @@ -142,13 +144,6 @@ public class GdBankController { } } - - - - - - - basicModel.setResult(result); } mav.setModel(basicModel); } else {