From 45e9fc880c61e12d6415755ee2a29f79fcf81fbb Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 11 三月 2022 09:49:38 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0' into wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
index a9464b7..ffe477f 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -33,12 +33,20 @@
 	@Autowired
     private ApplicationEventPublisher applicationEventPublisher;
 	
+	public void onlineEventPublish(Device device, String from, int expires) {
+		OnlineEvent onEvent = new OnlineEvent(this);
+		onEvent.setDevice(device);
+		onEvent.setFrom(from);
+		onEvent.setExpires(expires);
+        applicationEventPublisher.publishEvent(onEvent);
+    }
+
 	public void onlineEventPublish(Device device, String from) {
 		OnlineEvent onEvent = new OnlineEvent(this);
 		onEvent.setDevice(device);
 		onEvent.setFrom(from);
-        applicationEventPublisher.publishEvent(onEvent);
-    }
+		applicationEventPublisher.publishEvent(onEvent);
+	}
 	
 	public void outlineEventPublish(String deviceId, String from){
 		OfflineEvent outEvent = new OfflineEvent(this);
@@ -107,6 +115,12 @@
 	}
 
 
+	/**
+	 *
+	 * @param platformId
+	 * @param deviceChannels
+	 * @param type
+	 */
 	public void catalogEventPublish(String platformId, List<DeviceChannel> deviceChannels, String type) {
 		CatalogEvent outEvent = new CatalogEvent(this);
 		List<DeviceChannel> channels = new ArrayList<>();

--
Gitblit v1.8.0