| | |
| | | package com.whyc.service; |
| | | |
| | | public class CentralMonitorSysSTService { |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.CentralMonitorSysRTMapper; |
| | | import com.whyc.mapper.CentralMonitorSysSTMapper; |
| | | import com.whyc.pojo.CentralMonitorSysRT; |
| | | import com.whyc.pojo.CentralMonitorSysST; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Service |
| | | public class CentralMonitorSysSTService { |
| | | @Resource |
| | | private CentralMonitorSysSTMapper mapper; |
| | | |
| | | public Response getInfoByDevId(int devId) { |
| | | QueryWrapper<CentralMonitorSysST> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("dev_id",devId); |
| | | try{ |
| | | CentralMonitorSysST centralMonitorSysST = mapper.selectOne(queryWrapper); |
| | | return new Response<>().set(1,centralMonitorSysST); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return new Response<>().setCode(0); |
| | | } |
| | | } |
| | | |
| | | } |