whycxzp
2021-07-26 24fd4ac01b448c2dab5dbcc1f9a641a38fc783e7
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
package com.whyc.service;
 
import com.whyc.dto.Response;
import com.whyc.mapper.LeakageMonitoringMapper;
import com.whyc.pojo.LeakageMonitoring;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class LeakageMonitoringService {
 
 
    @Resource
    private LeakageMonitoringMapper mapper;
 
 
    public Response<List<LeakageMonitoring>> getAllLeakageMonitoring() {
 
        Response<List<LeakageMonitoring>> response = new Response<>();
        List<LeakageMonitoring> leakageMonitorings = mapper.selectList(null);
        return response.set(1,leakageMonitorings);
    }
 
    public Response<Object> getLeakageMonitoring() {
 
        LeakageMonitoring leakageMonitoring = mapper.selectOne(null);
        Response<Object> response = new Response<>();
        response.set(1, leakageMonitoring);
        return response;
    }
}