| | |
| | | } |
| | | |
| | | /** |
| | | * 将摄像头设备相关信息更新到数据库 |
| | | * |
| | | * @param monitor 摄像头对象 |
| | | * @return |
| | | */ |
| | | public boolean upDateMonitorInfo(Monitor monitor) { |
| | | if (monitor.getId() == null) { |
| | | throw new BusinessException("缺少摄像头相关ID参数"); |
| | | } |
| | | |
| | | Monitor info = getById(monitor.getId()); |
| | | |
| | | if (info == null) { |
| | | throw new BusinessException("找不到相关摄像头"); |
| | | } |
| | | if (!monitor.getDevicesCode().equals(info.getDevicesCode()) || !monitor.getDeviceSerial().equals(info.getDeviceSerial())) { |
| | | throw new BusinessException("监控序列号或监控验证码不正确"); |
| | | } |
| | | |
| | | return updateById(monitor); |
| | | } |
| | | |
| | | /** |
| | | * 返回摄像头实时画面播放地址 |
| | | * |
| | | * @param accessToken |