Commit 61e91afd9112e8650ce1ec15f575df587f4f27a6

Authored by 648540858
1 parent 1c95f1b4

#390

src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java
@@ -68,8 +68,6 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> { @@ -68,8 +68,6 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> {
68 String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetup.getServerId() + "_" + event.getDevice().getDeviceId(); 68 String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetup.getServerId() + "_" + event.getDevice().getDeviceId();
69 Device deviceInStore = storager.queryVideoDevice(device.getDeviceId()); 69 Device deviceInStore = storager.queryVideoDevice(device.getDeviceId());
70 device.setOnline(1); 70 device.setOnline(1);
71 - // 处理上线监听  
72 - storager.updateDevice(device);  
73 switch (event.getFrom()) { 71 switch (event.getFrom()) {
74 // 注册时触发的在线事件,先在redis中增加超时超时监听 72 // 注册时触发的在线事件,先在redis中增加超时超时监听
75 case VideoManagerConstants.EVENT_ONLINE_REGISTER: 73 case VideoManagerConstants.EVENT_ONLINE_REGISTER:
@@ -98,7 +96,8 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> { @@ -98,7 +96,8 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> {
98 96
99 break; 97 break;
100 } 98 }
101 - 99 + // 处理上线监听
  100 + storager.updateDevice(device);
102 List<DeviceChannel> deviceChannelList = storager.queryOnlineChannelsByDeviceId(device.getDeviceId()); 101 List<DeviceChannel> deviceChannelList = storager.queryOnlineChannelsByDeviceId(device.getDeviceId());
103 eventPublisher.catalogEventPublish(null, deviceChannelList, CatalogEvent.ON); 102 eventPublisher.catalogEventPublish(null, deviceChannelList, CatalogEvent.ON);
104 // 上线添加订阅 103 // 上线添加订阅