From acd767b47a4f78e905a3cbe89a4c82ffe88d73d9 Mon Sep 17 00:00:00 2001
From: hotcoffie <35990065+hotcoffie@users.noreply.github.com>
Date: 星期四, 21 四月 2022 10:04:50 +0800
Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
index a3c5c6c..fbb6e38 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
@@ -520,6 +520,12 @@
 	@Override
 	public boolean updateParentPlatform(ParentPlatform parentPlatform) {
 		int result = 0;
+		if (parentPlatform.getCatalogGroup() == 0) {
+			parentPlatform.setCatalogGroup(1);
+		}
+		if (parentPlatform.getAdministrativeDivision() == null) {
+			parentPlatform.setAdministrativeDivision(parentPlatform.getAdministrativeDivision());
+		}
 		ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId());
 		if (parentPlatform.getId() == null ) {
 			if (parentPlatform.getCatalogId() == null) {
@@ -539,6 +545,7 @@
 				parentPlatformCatch.setId(parentPlatform.getServerGBId());
 				redisCatchStorage.delPlatformCatchInfo(parentPlatById.getServerGBId());
 			}
+
 			result = platformMapper.updateParentPlatform(parentPlatform);
 		}
 		// 鏇存柊缂撳瓨
@@ -1074,7 +1081,7 @@
 		deviceChannel.setParentId(catalog.getParentId());
 		deviceChannel.setRegisterWay(1);
 		// 琛屾斂鍖哄垝搴旇鏄疍omain鐨勫墠鍏綅
-		deviceChannel.setCivilCode(parentPlatByServerGBId.getDeviceGBId().substring(0,6));
+		deviceChannel.setCivilCode(parentPlatByServerGBId.getAdministrativeDivision());
 		deviceChannel.setModel("live");
 		deviceChannel.setOwner("wvp-pro");
 		deviceChannel.setSecrecy("0");

--
Gitblit v1.8.0