diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceChannelServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceChannelServiceImpl.java index 90f7783c..4b05153a 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceChannelServiceImpl.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceChannelServiceImpl.java @@ -47,7 +47,7 @@ public class SisDeviceChannelServiceImpl implements ISisDeviceChannelService { private final SisDeviceChannelMapper baseMapper; private final ISisDeviceGroupService deviceGroupService; - private HikApiService hikApiService; + private final HikApiService hikApiService; @@ -239,6 +239,7 @@ public class SisDeviceChannelServiceImpl implements ISisDeviceChannelService { } } else if (DeviceTypeEnum.NVR.getType().equals(bo.getDeviceType()) || DeviceTypeEnum.DVR.getType().equals(bo.getDeviceType())) { DeviceInfo channelInfo = hikApiService.getChannelInfo(bo.getDeviceIp()); + if (channelInfo != null && CollUtil.isNotEmpty(channelInfo.getChannelInfo())) { List insertChannels = new ArrayList<>(channelInfo.getChannelInfo().size()); List updateChannels = new ArrayList<>(channelInfo.getChannelInfo().size());