zhangjian
2023-10-24 f6a88f721b58a8f97759c0c1542608ff68b0fb5c
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/ArdCamerasServiceImpl.java
@@ -84,12 +84,12 @@
    public ArdCameras selectArdCamerasById(String id) {
        ArdCameras ardCameras = ardCamerasMapper.selectArdCamerasById(id);
        if (ardCameras != null) {
                ArdChannel ardChannel = new ArdChannel();
                ardChannel.setDeviceId(ardCameras.getId());
                List<ArdChannel> ardChannels = ardChannelMapper.selectArdChannelList(ardChannel);
                if (ardChannels != null) {
                    ardCameras.setChannelList(ardChannels);
                }
            ArdChannel ardChannel = new ArdChannel();
            ardChannel.setDeviceId(ardCameras.getId());
            List<ArdChannel> ardChannels = ardChannelMapper.selectArdChannelList(ardChannel);
            if (ardChannels != null) {
                ardCameras.setChannelList(ardChannels);
            }
        }
        return ardCameras;
    }
@@ -199,7 +199,15 @@
    }
    public List findOptions(ArdCameras ardCameras) {
        return ardCamerasMapper.findOptions(ardCameras);
        List<ArdCameras> options = ardCamerasMapper.findOptions(ardCameras);
        for (ArdCameras camera :
                options) {
            ArdChannel ardChannel = new ArdChannel();
            ardChannel.setDeviceId(camera.getId());
            List<ArdChannel> ardChannels = ardChannelMapper.selectArdChannelList(ardChannel);
            camera.setChannelList(ardChannels);
        }
        return options;
    }
    /**