From 1dbb559b388831b5f15e690d0b33d24b1faaa983 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 25 一月 2022 15:43:52 +0800
Subject: [PATCH] 优化文件导入判断

---
 src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
index ac278a7..98f3594 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
@@ -679,6 +679,7 @@
 		streamProxyItem.setStatus(true);
 		String now = this.format.format(System.currentTimeMillis());
 		streamProxyItem.setCreateTime(now);
+		streamProxyItem.setCreateStamp(System.currentTimeMillis());
 		try {
 			if (gbStreamMapper.add(streamProxyItem)<0 || streamProxyMapper.add(streamProxyItem) < 0) {
 				//浜嬪姟鍥炴粴
@@ -814,9 +815,11 @@
 					streamPushItem.setCatalogId(parentPlatform.getCatalogId());
 					streamPushItem.setPlatformId(parentPlatform.getServerGBId());
 					String stream = streamPushItem.getStream();
-					StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream, parentPlatform.getServerGBId());
+					StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream,
+							parentPlatform.getServerGBId());
 					if (streamProxyItems == null) {
 						platformGbStreamMapper.add(streamPushItem);
+						eventPublisher.catalogEventPublishForStream(parentPlatform.getServerGBId(), streamPushItem, CatalogEvent.ADD);
 					}
 				}
 			}

--
Gitblit v1.8.0