From 34d2384b1a775f4cfe8075d40ac06b52c0283f4c Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Fri, 26 Apr 2024 18:13:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=A9=E6=B0=94=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E8=BF=94=E5=9B=9E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zc/business/controller/WeatherForecastController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"));