648540858
2023-05-16 be9bf60e81e22d717199d73886a04ab3019390ab
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForCatalogProcessor.java
@@ -65,7 +65,7 @@
         String deviceId = SipUtils.getUserIdFromFromHeader(fromHeader);
         Device device = redisCatchStorage.getDevice(deviceId);
         if (device == null || device.getOnline() == 0) {
         if (device == null || !device.isOnLine()) {
            logger.warn("[收到目录订阅]:{}, 但是设备已经离线", (device != null ? device.getDeviceId():"" ));
            return;
         }
@@ -108,41 +108,58 @@
                     if (updateChannelOnlineList.size() > 300) {
                        executeSaveForOnline();
                     }
                     if (userSetting.getDeviceStatusNotify()) {
                        // 发送redis消息
                        redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), channel.getChannelId(), true);
                     }
                     break;
                  case CatalogEvent.OFF :
                     // 离线
                     logger.info("[收到通道离线通知] 来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                     if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
                        logger.info("[收到通道离线通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                     }else {
                        updateChannelOfflineList.add(channel);
                        if (updateChannelOfflineList.size() > 300) {
                           executeSaveForOffline();
                        }
                     }else {
                        logger.info("[收到通道离线通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                        if (userSetting.getDeviceStatusNotify()) {
                           // 发送redis消息
                           redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), channel.getChannelId(), false);
                        }
                     }
                     break;
                  case CatalogEvent.VLOST:
                     // 视频丢失
                     logger.info("[收到通道视频丢失通知] 来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                     if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
                        logger.info("[收到通道视频丢失通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                     }else {
                        updateChannelOfflineList.add(channel);
                        if (updateChannelOfflineList.size() > 300) {
                           executeSaveForOffline();
                        }
                     }else {
                        logger.info("[收到通道视频丢失通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                        if (userSetting.getDeviceStatusNotify()) {
                           // 发送redis消息
                           redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), channel.getChannelId(), false);
                        }
                     }
                     break;
                  case CatalogEvent.DEFECT:
                     // 故障
                     logger.info("[收到通道视频故障通知] 来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                     if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
                        logger.info("[收到通道视频故障通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                     }else {
                        updateChannelOfflineList.add(channel);
                        if (updateChannelOfflineList.size() > 300) {
                           executeSaveForOffline();
                        }
                     }else {
                        logger.info("[收到通道视频故障通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId());
                        if (userSetting.getDeviceStatusNotify()) {
                           // 发送redis消息
                           redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), channel.getChannelId(), false);
                        }
                     }
                     break;
                  case CatalogEvent.ADD: