| | |
| | | import com.ruoyi.device.camera.domain.CameraCmd; |
| | | import com.ruoyi.device.channel.domain.ArdChannel; |
| | | import com.ruoyi.device.channel.mapper.ArdChannelMapper; |
| | | import com.ruoyi.device.hiksdk.service.IHikClientService; |
| | | import com.ruoyi.media.service.IVtduService; |
| | | import com.ruoyi.scheduling.domian.SchedulingParam; |
| | | import com.ruoyi.utils.gis.GisUtil; |
| | | import com.ruoyi.utils.tools.ArdTool; |
| | |
| | | |
| | | @Resource |
| | | private ArdChannelMapper ardChannelMapper; |
| | | |
| | | @Resource |
| | | private IVtduService vtduService; |
| | | |
| | | @PostConstruct |
| | | public void loadCameras() { |
| | | //清空相机缓存 |
| | | Collection<String> cacheKeys = redisCache.keys(getCacheKey("*")); |
| | | redisCache.deleteObject(cacheKeys); |
| | | //重新加载相机到缓存 |
| | | List<ArdCameras> ardCameras = selectArdCamerasListNoDataScope(new ArdCameras()); |
| | | for (ArdCameras ardCamera : ardCameras) { |
| | | redisCache.setCacheObject(getCacheKey(ardCamera.getId()), ardCamera); |
| | |
| | | if (res > 0) { |
| | | for (String id : ids) { |
| | | redisCache.deleteObject(getCacheKey(id)); |
| | | //删除流媒体 |
| | | vtduService.deleteVtduByCameraId(id); |
| | | //删除当前相机的所有通道 |
| | | ardChannelMapper.deleteArdChannelByDeviceId(id); |
| | | } |