ard-work/src/main/java/com/ruoyi/device/camera/service/impl/ArdCamerasServiceImpl.java
@@ -12,6 +12,8 @@
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;
@@ -45,10 +47,15 @@
    @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);
@@ -156,6 +163,8 @@
        if (res > 0) {
            for (String id : ids) {
                redisCache.deleteObject(getCacheKey(id));
                //删除流媒体
                vtduService.deleteVtduByCameraId(id);
                //删除当前相机的所有通道
                ardChannelMapper.deleteArdChannelByDeviceId(id);
            }