diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java index 813c6255..6d905f18 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java @@ -185,8 +185,9 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In } log.info("[收到bye] 来自:{}, 通道: {}, 类型: {}", ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getType()); - Platform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getDeviceId()); - if (platform != null ) { + + if (ssrcTransaction.getPlatformId() != null ) { + Platform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getDeviceId()); if (ssrcTransaction.getType().equals(InviteSessionType.BROADCAST)) { log.info("[收到bye] 上级停止语音对讲,来自:{}, 通道已停止推流: {}", ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId()); CommonGBChannel channel = channelService.getOne(ssrcTransaction.getChannelId()); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/info/InfoRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/info/InfoRequestProcessor.java index 2ed5fe10..238cda23 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/info/InfoRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/info/InfoRequestProcessor.java @@ -109,7 +109,7 @@ public class InfoRequestProcessor extends SIPRequestProcessorParent implements I } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(sendRtpInfo.getChannelId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", sendRtpInfo.getChannelId()); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/control/cmd/DeviceControlQueryMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/control/cmd/DeviceControlQueryMessageHandler.java index 3d857a29..cb1cced6 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/control/cmd/DeviceControlQueryMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/control/cmd/DeviceControlQueryMessageHandler.java @@ -145,7 +145,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -195,7 +195,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -243,7 +243,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -278,7 +278,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -341,7 +341,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -393,7 +393,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -439,7 +439,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); @@ -491,7 +491,7 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent return; } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 log.warn("[INFO 消息] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java index ec0c3936..293f3e37 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java @@ -70,9 +70,6 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme @Autowired private ThreadPoolTaskExecutor taskExecutor; - @Autowired - private EventPublisher eventPublisher; - @Override public void afterPropertiesSet() throws Exception { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/DeviceInfoQueryMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/DeviceInfoQueryMessageHandler.java index 937c61e1..ca577440 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/DeviceInfoQueryMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/DeviceInfoQueryMessageHandler.java @@ -106,10 +106,10 @@ public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent imp } // 根据通道ID,获取所属设备 - Device device = deviceService.getDeviceByChannelId(channel.getGbId()); + Device device = deviceService.getDevice(channel.getGbDeviceDbId()); if (device == null) { // 不存在则回复404 - log.warn("[DeviceInfo] 通道所属设备不存在, 通道ID: {}", channel.getGbId()); + log.warn("[DeviceInfo] 通道所属设备不存在, 通道ID: {}", channel.getGbDeviceDbId()); try { responseAck(request, Response.NOT_FOUND, "device not found "); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e7c85a82..b91ff2aa 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,4 +2,4 @@ spring: application: name: wvp profiles: - active: 272重构-postgre \ No newline at end of file + active: 272重构 \ No newline at end of file