648540858
2022-04-20 7145ce07e6a84854fc1e5afd65b664c54a47bffd
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);
      // 行政区划应该是Domain的前八位
      deviceChannel.setCivilCode(parentPlatByServerGBId.getDeviceGBId().substring(0,6));
      deviceChannel.setCivilCode(parentPlatByServerGBId.getAdministrativeDivision());
      deviceChannel.setModel("live");
      deviceChannel.setOwner("wvp-pro");
      deviceChannel.setSecrecy("0");