New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.AlarmParamMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class AlarmParamService { |
| | | @Autowired(required = false) |
| | | private AlarmParamMapper mapper; |
| | | |
| | | //获取设备告警参数 |
| | | public Response getAlmParam(Integer devId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.orderByAsc("num"); |
| | | List list=mapper.selectList(wrapper); |
| | | return new Response().setII(1,list!=null,list,"获取设备告警参数"); |
| | | } |
| | | } |