|
|
@@ -188,8 +188,13 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
|
|
|
private List<WeatherWarning> buildWeatherWarningList(String str) {
|
|
|
JSONObject obj = JSON.parseObject(str);
|
|
|
//福建农信返回的数据外面多了一层(Data层为农信添加的,需要多取一层)
|
|
|
- JSONObject objectNX = obj.getJSONObject("Data");
|
|
|
- JSONObject resBody =objectNX.getJSONObject("showapi_res_body");
|
|
|
+ JSONObject resBody = null;
|
|
|
+ if(obj.containsKey("Data")){
|
|
|
+ JSONObject objectNX = obj.getJSONObject("Data");
|
|
|
+ resBody =objectNX.getJSONObject("showapi_res_body");
|
|
|
+ }else{
|
|
|
+ resBody =obj.getJSONObject("showapi_res_body");
|
|
|
+ }
|
|
|
//JSONObject resBody =obj.getJSONObject("showapi_res_body");
|
|
|
List<WeatherWarning> list = new ArrayList<>();
|
|
|
if(resBody!=null){
|