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") }