diff --git a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java index fc8ffaae..8f167ab7 100644 --- a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java +++ b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java @@ -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"));