whycxzp
2021-01-07 d7fb9e92779e971954ca59b86848569592f6185b
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.dto.Response;
import com.whyc.mapper.CentralMonitorSysRTMapper;
import com.whyc.pojo.CentralMonitorSysRT;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
 
import javax.annotation.Resource;
 
@Service
public class CentralMonitorSysRTService {
 
    @Resource
    private CentralMonitorSysRTMapper mapper;
 
    public Response getInfoByDevId(int devId) {
        QueryWrapper<CentralMonitorSysRT> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("dev_id",devId);
        try{
            CentralMonitorSysRT centralMonitorSysRT = mapper.selectOne(queryWrapper);
            return new Response<>().set(1,centralMonitorSysRT);
        }catch (Exception e){
            e.printStackTrace();
            return new Response<>().setCode(0);
        }
    }
}