From 59ef6e67d3a1357c19039527dac47747e2ac20fe Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 17 三月 2022 10:29:49 +0800
Subject: [PATCH] 统一国标设备与级联平台字符集的使用

---
 src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 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 9992ebc..0ac8745 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
@@ -141,6 +141,7 @@
 		String now = this.format.format(System.currentTimeMillis());
 		device.setUpdateTime(now);
 		Device deviceByDeviceId = deviceMapper.getDeviceByDeviceId(device.getDeviceId());
+		device.setCharset(device.getCharset().toUpperCase());
 		if (deviceByDeviceId == null) {
 			device.setCreateTime(now);
 			redisCatchStorage.updateDevice(device);
@@ -772,7 +773,7 @@
 		try {
 			if (streamProxyMapper.update(streamProxyItem) > 0) {
 				if (!StringUtils.isEmpty(streamProxyItem.getGbId())) {
-					if (gbStreamMapper.update(streamProxyItem) > 0) {
+					if (gbStreamMapper.updateByAppAndStream(streamProxyItem) == 0) {
 						//浜嬪姟鍥炴粴
 						dataSourceTransactionManager.rollback(transactionStatus);
 						return false;
@@ -885,12 +886,11 @@
 			List<ParentPlatform> parentPlatforms = parentPlatformMapper.selectAllAhareAllLiveStream();
 			if (parentPlatforms.size() > 0) {
 				for (ParentPlatform parentPlatform : parentPlatforms) {
-					streamPushItem.setCatalogId(parentPlatform.getCatalogId());
-					streamPushItem.setPlatformId(parentPlatform.getServerGBId());
-					String stream = streamPushItem.getStream();
-					StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream,
+					StreamProxyItem streamProxyItem = platformGbStreamMapper.selectOne(streamPushItem.getApp(), streamPushItem.getStream(),
 							parentPlatform.getServerGBId());
-					if (streamProxyItems == null) {
+					if (streamProxyItem == null) {
+						streamPushItem.setCatalogId(parentPlatform.getCatalogId());
+						streamPushItem.setPlatformId(parentPlatform.getServerGBId());
 						platformGbStreamMapper.add(streamPushItem);
 						eventPublisher.catalogEventPublishForStream(parentPlatform.getServerGBId(), streamPushItem, CatalogEvent.ADD);
 					}

--
Gitblit v1.8.0