Fang
2022-03-07 bea63f67e75ea6c38d946c2ee463260fcf815f87
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
@@ -14,6 +14,7 @@
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.storager.dao.dto.ChannelSourceInfo;
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;
@@ -283,7 +284,8 @@
         logger.debug("[目录查询]收到的数据存在重复: {}" , stringBuilder);
      }
      try {
         int cleanChannelsResult = deviceChannelMapper.cleanChannelsByDeviceId(deviceId);
//         int cleanChannelsResult = deviceChannelMapper.cleanChannelsByDeviceId(deviceId);
         int cleanChannelsResult = deviceChannelMapper.cleanChannelsNotInList(deviceId, channels);
         int limitCount = 300;
         boolean result = cleanChannelsResult < 0;
         if (!result && channels.size() > 0) {
@@ -716,7 +718,7 @@
      try {
         if (streamProxyMapper.add(streamProxyItem) > 0) {
            if (!StringUtils.isEmpty(streamProxyItem.getGbId())) {
               if (gbStreamMapper.add(streamProxyItem) > 0) {
               if (gbStreamMapper.add(streamProxyItem) < 0) {
                  //事务回滚
                  dataSourceTransactionManager.rollback(transactionStatus);
                  return false;
@@ -1104,4 +1106,9 @@
   public PlatformCatalog queryDefaultCatalogInPlatform(String platformId) {
      return catalogMapper.selectDefaultByPlatFormId(platformId);
   }
   @Override
   public List<ChannelSourceInfo> getChannelSource(String platformId, String gbId) {
      return platformMapper.getChannelSource(platformId, gbId);
   }
}