kaiyu
2021-11-04 106f592036957a45f467d93556a63facf45e6505
screen-api/src/main/java/com/moral/api/controller/DeviceController.java
@@ -54,8 +54,17 @@
    @Autowired
    private DeviceService deviceService;
    /**
    * @Description: 根据mac查询报警信息
            * @Param: [mac]
            * @return: com.moral.constant.ResultMessage
            * @Author: 陈凯裕
            * @Date: 2021/8/23
            */
    @GetMapping("queryAlarmByMac")
    public ResultMessage queryAlarmByMac(String mac) {
        if(mac==null)
            return new ResultMessage(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg(),null);
        List<Sensor> sensors = organizationUnitAlarmService.queryAlarmLevel(mac);
        AlarmLevelVO vo = AlarmLevelVO.convert(sensors);
        return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(), vo);