From f33c3a36302749d8552b281de3dbe37f672bba86 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 27 一月 2022 18:08:19 +0800
Subject: [PATCH] 添加重启后拉流代理自动恢复

---
 src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 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 dc4d497..f43f92f 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) {
 				//浜嬪姟鍥炴粴
@@ -859,8 +860,8 @@
 	}
 
 	@Override
-	public List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable) {
-		return streamProxyMapper.selectForEnableInMediaServer(id, enable);
+	public List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable, boolean status) {
+		return streamProxyMapper.selectForEnableInMediaServer(id, enable, status);
 	}
 
 
@@ -1020,7 +1021,8 @@
 		deviceChannel.setParental(1);
 		deviceChannel.setParentId(catalog.getParentId());
 		deviceChannel.setRegisterWay(1);
-		deviceChannel.setCivilCode(sipConfig.getDomain());
+		// 琛屾斂鍖哄垝搴旇鏄疍omain鐨勫墠鍏綅
+		deviceChannel.setCivilCode(sipConfig.getDomain().substring(0, sipConfig.getDomain().length() - 2));
 		deviceChannel.setModel("live");
 		deviceChannel.setOwner("wvp-pro");
 		deviceChannel.setSecrecy("0");
@@ -1057,4 +1059,9 @@
 		platformGbStreamMapper.delByPlatformId(serverGBId);
 		platformChannelMapper.delByPlatformId(serverGBId);
 	}
+
+	@Override
+	public PlatformCatalog queryDefaultCatalogInPlatform(String platformId) {
+		return catalogMapper.selectDefaultByPlatFormId(platformId);
+	}
 }

--
Gitblit v1.8.0