whycxzp
2021-07-26 dfd0dddb3864888a19a93be1100b38f8449abeef
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
package com.whyc.service;
 
import com.whyc.dto.Response;
import com.whyc.mapper.InsulationMonitoringMapper;
import com.whyc.pojo.InsulationMonitoring;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class InsulationMonitoringService {
 
    @Resource
    private InsulationMonitoringMapper mapper;
 
 
    public Response<List<InsulationMonitoring>> getAllInsulationMonitoring() {
 
        Response<List<InsulationMonitoring>> response = new Response<>();
        List<InsulationMonitoring> insulationMonitorings = mapper.selectList(null);
        return response.set(1,insulationMonitorings);
    }
 
    public Response<Object> getInsulationMonitoring() {
 
        InsulationMonitoring insulationMonitoring = mapper.selectOne(null);
        Response<Object> response = new Response<>();
        response.set(1, insulationMonitoring);
        return response;
    }
}