liurunyu
2025-09-01 cb9caeaf939dbc10522f395647ca7fefb3a8634b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 ;
    }
 
}