Commit 1b200bcc904d088b31ceaf1e9261b5433d9322a6

Authored by Lawrence
1 parent fede5969

将上级平台标识改为serverGBId

src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java
@@ -51,7 +51,7 @@ public interface ParentPlatformMapper { @@ -51,7 +51,7 @@ public interface ParentPlatformMapper {
51 @Select("SELECT * FROM parent_platform WHERE enable=#{enable}") 51 @Select("SELECT * FROM parent_platform WHERE enable=#{enable}")
52 List<ParentPlatform> getEnableParentPlatformList(boolean enable); 52 List<ParentPlatform> getEnableParentPlatformList(boolean enable);
53 53
54 - @Select("SELECT * FROM parent_platform WHERE deviceGBId=#{platformGbId}") 54 + @Select("SELECT * FROM parent_platform WHERE serverGBId=#{platformGbId}")
55 ParentPlatform getParentPlatById(String platformGbId); 55 ParentPlatform getParentPlatById(String platformGbId);
56 56
57 @Update("UPDATE parent_platform SET status=false" ) 57 @Update("UPDATE parent_platform SET status=false" )
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
@@ -231,14 +231,14 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager { @@ -231,14 +231,14 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
231 @Override 231 @Override
232 public boolean updateParentPlatform(ParentPlatform parentPlatform) { 232 public boolean updateParentPlatform(ParentPlatform parentPlatform) {
233 int result = 0; 233 int result = 0;
234 - ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getDeviceGBId());  
235 - if ( platformMapper.getParentPlatById(parentPlatform.getDeviceGBId()) == null) { 234 + ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId());
  235 + if ( platformMapper.getParentPlatById(parentPlatform.getServerGBId()) == null) {
236 result = platformMapper.addParentPlatform(parentPlatform); 236 result = platformMapper.addParentPlatform(parentPlatform);
237 237
238 if (parentPlatformCatch == null) { 238 if (parentPlatformCatch == null) {
239 parentPlatformCatch = new ParentPlatformCatch(); 239 parentPlatformCatch = new ParentPlatformCatch();
240 parentPlatformCatch.setParentPlatform(parentPlatform); 240 parentPlatformCatch.setParentPlatform(parentPlatform);
241 - parentPlatformCatch.setId(parentPlatform.getDeviceGBId()); 241 + parentPlatformCatch.setId(parentPlatform.getServerGBId());
242 } 242 }
243 }else { 243 }else {
244 result = platformMapper.updateParentPlatform(parentPlatform); 244 result = platformMapper.updateParentPlatform(parentPlatform);
src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java
@@ -82,7 +82,8 @@ public class PlatformController { @@ -82,7 +82,8 @@ public class PlatformController {
82 } 82 }
83 // TODO 检查是否已经存在,且注册成功, 如果注册成功,需要先注销之前再,修改并注册 83 // TODO 检查是否已经存在,且注册成功, 如果注册成功,需要先注销之前再,修改并注册
84 84
85 - ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId()); 85 + // ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getDeviceGBId());
  86 + ParentPlatform parentPlatformOld = storager.queryParentPlatById(parentPlatform.getServerGBId());
86 87
87 boolean updateResult = storager.updateParentPlatform(parentPlatform); 88 boolean updateResult = storager.updateParentPlatform(parentPlatform);
88 89