From 8447b62637072b6cfc12f264b333747583cfe484 Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Thu, 13 Feb 2025 09:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gj/data_handle/AddrAlaisProcess.groovy | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddrAlaisProcess.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddrAlaisProcess.groovy index 1cf20acc9..62d1f299e 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddrAlaisProcess.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddrAlaisProcess.groovy @@ -50,9 +50,21 @@ class AddrAlaisProcess { def address = "" def map = [:] if (jsonObject) { - map.province = jsonObject.get("province") - map.city = jsonObject.get("city") - map.district = jsonObject.get("district") + if (jsonObject.get("province") && jsonObject.get("province") != "null") { + map.province = jsonObject.get("province") + }else{ + map.province = "" + } + if (jsonObject.get("city") && jsonObject.get("city") != "null") { + map.city = jsonObject.get("city") + }else{ + map.city = "" + } + if (jsonObject.get("district") && jsonObject.get("district") != "null") { + map.district = jsonObject.get("district") + }else{ + map.district = "" + } if (jsonObject.get("street") && jsonObject.get("street") != "null") { address = jsonObject.get("street") }