1;获取店铺名接口 解析报错问题处理
This commit is contained in:
parent
5e84bb7239
commit
0452fc3071
|
@ -603,19 +603,19 @@ public class MeituanServiceImpl implements IMeituanService {
|
|||
String result = null;
|
||||
try {
|
||||
result = EntityUtils.toString(client.execute(request).getEntity());
|
||||
if (result != null){
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString(("code"));
|
||||
if ("0".equals(code)) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
JSONObject wmPoiData = data.getJSONObject("wmPoiData");
|
||||
String wmPoiName = wmPoiData.getString("wmPoiName");
|
||||
return wmPoiName;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
if (result != null){
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString(("code"));
|
||||
if ("0".equals(code)) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
JSONObject wmPoiData = data.getJSONObject("wmPoiData");
|
||||
String wmPoiName = wmPoiData.getString("wmPoiName");
|
||||
return wmPoiName;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -637,18 +637,18 @@ public class MeituanServiceImpl implements IMeituanService {
|
|||
String result = null;
|
||||
try {
|
||||
result = EntityUtils.toString(client.execute(request).getEntity());
|
||||
if (result != null){
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString(("code"));
|
||||
if ("0".equals(code)) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
String wmPoiName = data.getString("wmPoiName");
|
||||
return wmPoiName;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
if (result != null){
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String code = jsonObject.getString(("code"));
|
||||
if ("0".equals(code)) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
String wmPoiName = data.getString("wmPoiName");
|
||||
return wmPoiName;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue