| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.LockAlarmMapper; |
| | | import com.whyc.mapper.LockInfMapper; |
| | | import com.whyc.pojo.db_area.LockInf; |
| | | import com.whyc.pojo.db_lock_alarm.LockAlarm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public class LockAlarmService { |
| | | @Autowired(required = false) |
| | | private LockAlarmMapper mapper; |
| | | |
| | | @Autowired(required = false) |
| | | private LockInfMapper linfMapper; |
| | | //查询锁实时告警信息 |
| | | public Response getLockAlm(Integer lockId, Integer almId,int pageNum, int pageSize) { |
| | | PageHelper.startPage(pageNum,pageSize); |
| | |
| | | wrapper.eq("alm_id",almId); |
| | | } |
| | | List<LockAlarm> list=mapper.selectList(wrapper); |
| | | for (LockAlarm alm:list) { |
| | | LockInf linf=linfMapper.getlinfBylockId(alm.getLockId()); |
| | | alm.setLinf(linf); |
| | | } |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null,pageInfo,"查询锁实时告警信息"); |
| | | } |