朱俊杰
2022-02-10 37a84e66917d6e22e03e31b0a115e2c16d23ed21
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
@@ -13,6 +13,8 @@
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
import com.genersoft.iot.vmp.storager.dao.*;
import com.genersoft.iot.vmp.utils.node.ForestNodeMerger;
import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree;
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@@ -326,6 +328,11 @@
   @Override
   public List<DeviceChannel> queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit) {
      return deviceChannelMapper.queryChannelsByDeviceIdWithStartAndLimit(deviceId, null, query, hasSubChannel, online, start, limit);
   }
   @Override
   public List<DeviceChannelTree> tree(String deviceId) {
      return ForestNodeMerger.merge(deviceChannelMapper.tree(deviceId));
   }
   @Override
@@ -679,6 +686,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) {
            //事务回滚
@@ -859,8 +867,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);
   }
@@ -1020,7 +1028,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");
@@ -1057,4 +1066,9 @@
      platformGbStreamMapper.delByPlatformId(serverGBId);
      platformChannelMapper.delByPlatformId(serverGBId);
   }
   @Override
   public PlatformCatalog queryDefaultCatalogInPlatform(String platformId) {
      return catalogMapper.selectDefaultByPlatFormId(platformId);
   }
}