Lawrence
2021-01-15 1b200bcc904d088b31ceaf1e9261b5433d9322a6
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);
@@ -249,9 +249,12 @@
      return result > 0;
   }
   @Transactional
   @Override
   public boolean deleteParentPlatform(ParentPlatform parentPlatform) {
      int result = platformMapper.delParentPlatform(parentPlatform);
      // 删除关联的通道
      patformChannelMapper.cleanChannelForGB(parentPlatform.getDeviceGBId());
      return result > 0;
   }
@@ -286,6 +289,11 @@
      return new PageInfo<>(all);
   }
   @Override
   public List<ChannelReduce> queryChannelListInParentPlatform(String platformId) {
      return deviceChannelMapper.queryChannelListInAll(null, null, null, platformId, true);
   }
   @Override
   public int updateChannelForGB(String platformId, List<ChannelReduce> channelReduces) {