package com.dy.pipIrrWechat.mqtt;
|
|
import com.dy.pipIrrGlobal.daoRm.RmManureLastMapper;
|
import com.dy.pipIrrGlobal.daoRm.RmSoilLastMapper;
|
import com.dy.pipIrrGlobal.daoRm.RmWeatherLastMapper;
|
import com.dy.pipIrrGlobal.voRm.VoManure;
|
import com.dy.pipIrrGlobal.voRm.VoSoil;
|
import com.dy.pipIrrGlobal.voRm.VoSoilDay;
|
import com.dy.pipIrrGlobal.voRm.VoWeather;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* @Author: liurunyu
|
* @Date: 2025/8/14 8:32
|
* @Description
|
*/
|
@Slf4j
|
@Service
|
public class MqttLastSv {
|
@Autowired
|
private RmManureLastMapper rmManureLastDao ;
|
|
@Autowired
|
private RmSoilLastMapper rmSoilLastDao ;
|
|
@Autowired
|
private RmWeatherLastMapper rmWeatherLastDao ;
|
|
public VoManure oneManureLast(Long manureId) {
|
List<VoManure> list = this.rmManureLastDao.selectSomeByManureId(manureId) ;
|
if(list != null && list.size() > 0) {
|
return list.get(0) ;
|
}
|
return null ;
|
}
|
|
|
public VoSoil oneSoilLast(Long soilId) {
|
List<VoSoil> list = this.rmSoilLastDao.selectSomeBySoilId(soilId) ;
|
if(list != null && list.size() > 0) {
|
return list.get(0) ;
|
}
|
return null ;
|
}
|
|
|
public VoWeather oneWeatherLast(Long weatherId) {
|
List<VoWeather> list = this.rmWeatherLastDao.selectSomeByWeatherId(weatherId) ;
|
if(list != null && list.size() > 0) {
|
return list.get(0) ;
|
}
|
return null ;
|
}
|
|
}
|