From 1b200bcc904d088b31ceaf1e9261b5433d9322a6 Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: 星期五, 15 一月 2021 00:00:45 +0800 Subject: [PATCH] 将上级平台标识改为serverGBId --- src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java | 3 ++- src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java | 2 +- src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java index 7075757..6d5d83b 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java @@ -51,7 +51,7 @@ @Select("SELECT * FROM parent_platform WHERE enable=#{enable}") List<ParentPlatform> getEnableParentPlatformList(boolean enable); - @Select("SELECT * FROM parent_platform WHERE deviceGBId=#{platformGbId}") + @Select("SELECT * FROM parent_platform WHERE serverGBId=#{platformGbId}") ParentPlatform getParentPlatById(String platformGbId); @Update("UPDATE parent_platform SET status=false" ) 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 93d8c83..4547d76 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 @@ -231,14 +231,14 @@ @Override public boolean updateParentPlatform(ParentPlatform parentPlatform) { int result = 0; - ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getDeviceGBId()); - if ( platformMapper.getParentPlatById(parentPlatform.getDeviceGBId()) == null) { + ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId()); + if ( platformMapper.getParentPlatById(parentPlatform.getServerGBId()) == null) { result = platformMapper.addParentPlatform(parentPlatform); if (parentPlatformCatch == null) { parentPlatformCatch = new ParentPlatformCatch(); parentPlatformCatch.setParentPlatform(parentPlatform); - parentPlatformCatch.setId(parentPlatform.getDeviceGBId()); + parentPlatformCatch.setId(parentPlatform.getServerGBId()); } }else { result = platformMapper.updateParentPlatform(parentPlatform); diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java index a75d753..031fb09 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java @@ -82,7 +82,8 @@ } // TODO 妫�鏌ユ槸鍚﹀凡缁忓瓨鍦�,涓旀敞鍐屾垚鍔�, 濡傛灉娉ㄥ唽鎴愬姛,闇�瑕佸厛娉ㄩ攢涔嬪墠鍐�,淇敼骞舵敞鍐� - ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId()); + // ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId()); + ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getServerGBId()); boolean updateResult = storager.updateParentPlatform(parentPlatform); -- Gitblit v1.8.0