修复bug
This commit is contained in:
+4
-1
@@ -32,6 +32,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.impl.conn.DefaultProxyRoutePlanner;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.sothis.core.util.CollectionUtils;
|
||||
import org.sothis.core.util.Pager;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
@@ -42,6 +43,7 @@ import java.net.PasswordAuthentication;
|
||||
import java.net.Proxy;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -607,7 +609,8 @@ public class AddrSvcController {
|
||||
params.put("type", type);
|
||||
params.put("showFullValue", "2");
|
||||
Pager pager = new Pager(1, 1);
|
||||
VillageIdentify villageResult = villageIdentifyService.findAll(villageType, model.getCity(), model.getAddress(), pager).get(0);
|
||||
List<VillageIdentify> villageIdentifyList = villageIdentifyService.findAll(villageType, model.getCity(), model.getAddress(), pager);
|
||||
VillageIdentify villageResult = CollectionUtils.isNotEmpty(villageIdentifyList) ? villageIdentifyList.get(0) : null;
|
||||
if (villageResult != null && StringUtils.isNotBlank(villageResult.getVerifyFlag())) {
|
||||
Map<String, String> resultMap = new HashMap<String, String>();
|
||||
resultMap.put("province",villageResult.getProvince());
|
||||
|
||||
Reference in New Issue
Block a user