648540858
2022-01-27 f33c3a36302749d8552b281de3dbe37f672bba86
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
@@ -679,6 +679,7 @@
      streamProxyItem.setStatus(true);
      String now = this.format.format(System.currentTimeMillis());
      streamProxyItem.setCreateTime(now);
      streamProxyItem.setCreateStamp(System.currentTimeMillis());
      try {
         if (gbStreamMapper.add(streamProxyItem)<0 || streamProxyMapper.add(streamProxyItem) < 0) {
            //事务回滚
@@ -814,9 +815,11 @@
               streamPushItem.setCatalogId(parentPlatform.getCatalogId());
               streamPushItem.setPlatformId(parentPlatform.getServerGBId());
               String stream = streamPushItem.getStream();
               StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream, parentPlatform.getServerGBId());
               StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream,
                     parentPlatform.getServerGBId());
               if (streamProxyItems == null) {
                  platformGbStreamMapper.add(streamPushItem);
                  eventPublisher.catalogEventPublishForStream(parentPlatform.getServerGBId(), streamPushItem, CatalogEvent.ADD);
               }
            }
         }
@@ -857,8 +860,8 @@
   }
   @Override
   public List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable) {
      return streamProxyMapper.selectForEnableInMediaServer(id, enable);
   public List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable, boolean status) {
      return streamProxyMapper.selectForEnableInMediaServer(id, enable, status);
   }
@@ -1018,7 +1021,8 @@
      deviceChannel.setParental(1);
      deviceChannel.setParentId(catalog.getParentId());
      deviceChannel.setRegisterWay(1);
      deviceChannel.setCivilCode(sipConfig.getDomain());
      // 行政区划应该是Domain的前八位
      deviceChannel.setCivilCode(sipConfig.getDomain().substring(0, sipConfig.getDomain().length() - 2));
      deviceChannel.setModel("live");
      deviceChannel.setOwner("wvp-pro");
      deviceChannel.setSecrecy("0");
@@ -1055,4 +1059,9 @@
      platformGbStreamMapper.delByPlatformId(serverGBId);
      platformChannelMapper.delByPlatformId(serverGBId);
   }
   @Override
   public PlatformCatalog queryDefaultCatalogInPlatform(String platformId) {
      return catalogMapper.selectDefaultByPlatFormId(platformId);
   }
}