墒情数据接口
This commit is contained in:
@ -64,5 +64,5 @@ public interface IDeviceRealtimedataMoistureService
|
||||
* 获取最新一条墒情数据
|
||||
* @return
|
||||
*/
|
||||
public List<DeviceProperties> getLatestWeatherRealtimedata();
|
||||
public List<DeviceProperties> getLatestWeatherRealtimedata(String deviceId);
|
||||
}
|
||||
|
@ -100,10 +100,11 @@ public class DeviceRealtimedataMoistureServiceImpl implements IDeviceRealtimedat
|
||||
* 获取最新一条墒情数据
|
||||
* @return
|
||||
*/
|
||||
public List<DeviceProperties> getLatestWeatherRealtimedata(){
|
||||
public List<DeviceProperties> getLatestWeatherRealtimedata(String deviceId){
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.orderByDesc("real_time");
|
||||
queryWrapper.last("limit 1");
|
||||
queryWrapper.eq("device_id",deviceId);
|
||||
DeviceRealtimedataMoisture moisture = deviceRealtimedataMoistureMapper.selectOne(queryWrapper);
|
||||
List<Map<String, String>> mapList = new ArrayList<>();
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
|
Reference in New Issue
Block a user