Commit 1b200bcc904d088b31ceaf1e9261b5433d9322a6
1 parent
fede5969
将上级平台标识改为serverGBId
Showing
3 changed files
with
6 additions
and
5 deletions
src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java
| ... | ... | @@ -51,7 +51,7 @@ public interface ParentPlatformMapper { |
| 51 | 51 | @Select("SELECT * FROM parent_platform WHERE enable=#{enable}") |
| 52 | 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 | 55 | ParentPlatform getParentPlatById(String platformGbId); |
| 56 | 56 | |
| 57 | 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 | 231 | @Override |
| 232 | 232 | public boolean updateParentPlatform(ParentPlatform parentPlatform) { |
| 233 | 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 | 236 | result = platformMapper.addParentPlatform(parentPlatform); |
| 237 | 237 | |
| 238 | 238 | if (parentPlatformCatch == null) { |
| 239 | 239 | parentPlatformCatch = new ParentPlatformCatch(); |
| 240 | 240 | parentPlatformCatch.setParentPlatform(parentPlatform); |
| 241 | - parentPlatformCatch.setId(parentPlatform.getDeviceGBId()); | |
| 241 | + parentPlatformCatch.setId(parentPlatform.getServerGBId()); | |
| 242 | 242 | } |
| 243 | 243 | }else { |
| 244 | 244 | result = platformMapper.updateParentPlatform(parentPlatform); | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java
| ... | ... | @@ -82,7 +82,8 @@ public class PlatformController { |
| 82 | 82 | } |
| 83 | 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 | 88 | boolean updateResult = storager.updateParentPlatform(parentPlatform); |
| 88 | 89 | ... | ... |