diff --git a/src/main/java/com/ruoyi/device/domain/impl/WeatherDomainImpl.java b/src/main/java/com/ruoyi/device/domain/impl/WeatherDomainImpl.java index 39a4d89..5871927 100644 --- a/src/main/java/com/ruoyi/device/domain/impl/WeatherDomainImpl.java +++ b/src/main/java/com/ruoyi/device/domain/impl/WeatherDomainImpl.java @@ -40,15 +40,10 @@ public class WeatherDomainImpl implements IWeatherDomain { try { HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys); - String json = EntityUtils.toString(response.getEntity()); - System.out.println(json); - // 将JSON字符串转换为对象 WeatherResponse weatherResponse = JSON.parseObject(json, WeatherResponse.class); - // 降雨量(枚举值:0-无雨,1-小雨,2-中雨,3-大雨) - // 使用转换后的对象 if (weatherResponse != null && weatherResponse.getCode() == 0) { //转换风速:将风力等级转换为风速中间值