|
@@ -41,10 +41,11 @@ public class WeatherController {
|
|
|
|
|
|
LambdaQueryWrapper<Farm> wrapper = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<Farm> wrapper = Wrappers.lambdaQuery();
|
|
|
|
|
|
- wrapper.eq(Farm::getId, farmId);//未删除的阈值
|
|
|
|
|
|
+ wrapper.eq(Farm::getId, farmId);
|
|
|
|
|
|
Farm farm = farmMapper.selectOne(wrapper);
|
|
Farm farm = farmMapper.selectOne(wrapper);
|
|
|
|
|
|
|
|
+
|
|
String[] location = farm.getFrontLocation().split(",");
|
|
String[] location = farm.getFrontLocation().split(",");
|
|
|
|
|
|
String province = location[0];
|
|
String province = location[0];
|
|
@@ -132,10 +133,6 @@ public class WeatherController {
|
|
|
|
|
|
Object degree = JSONObject.fromObject(forecastobject01hDetail).get("degree");//当前温度
|
|
Object degree = JSONObject.fromObject(forecastobject01hDetail).get("degree");//当前温度
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
Object maxDegree = JSONObject.fromObject(forecastobject24hDetail).get("max_degree");//当天最高温
|
|
Object maxDegree = JSONObject.fromObject(forecastobject24hDetail).get("max_degree");//当天最高温
|
|
|
|
|
|
Object minDegree = JSONObject.fromObject(forecastobject24hDetail).get("min_degree");//当天最 低温
|
|
Object minDegree = JSONObject.fromObject(forecastobject24hDetail).get("min_degree");//当天最 低温
|
|
@@ -203,9 +200,10 @@ public class WeatherController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
WeatherResultEntity weatherResultEntity = new WeatherResultEntity();
|
|
WeatherResultEntity weatherResultEntity = new WeatherResultEntity();
|
|
|
|
|
|
|
|
+ weatherResultEntity.setLocation(farm.getLocation());
|
|
|
|
+
|
|
weatherResultEntity.setAlarm( alarm.toString());
|
|
weatherResultEntity.setAlarm( alarm.toString());
|
|
|
|
|
|
weatherResultEntity.setDegree((String) degree);
|
|
weatherResultEntity.setDegree((String) degree);
|