|
|
@ -104,7 +104,7 @@ public class WeatherForecastController extends BaseController { |
|
|
|
JSONObject jsonResult = JSONObject.parseObject(response.body().string()); |
|
|
|
if (jsonResult.getInteger("code") == 200) { |
|
|
|
|
|
|
|
jsonObject.put("name",dcRegion.getRegionName()); |
|
|
|
jsonResult.put("name",dcRegion.getRegionName()); |
|
|
|
jsonObject.put(weather.getString("METEOROLOGICALEARLYWARNING") + dcRegion.getId(), extracted(jsonResult,"warning")); |
|
|
|
|
|
|
|
} else { |
|
|
@ -179,6 +179,7 @@ public class WeatherForecastController extends BaseController { |
|
|
|
if (jsonResult.getInteger("code") == 200) { |
|
|
|
|
|
|
|
jsonObject.put("name",dcRegion.getRegionName()); |
|
|
|
jsonResult.put("name",dcRegion.getRegionName()); |
|
|
|
if (Objects.equals(redisKey, weather.getString("WEATHERFACTS"))) { |
|
|
|
|
|
|
|
jsonObject.put(redisKey + dcRegion.getId(), extracted(jsonResult, "now")); |
|
|
|