From fc90cd7951600ce5173f71c3e28d78e69b4db4ae Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 19 十二月 2022 14:20:22 +0800
Subject: [PATCH] 优化tcp主动方式的语音对讲

---
 src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java |   95 -----------------------------------------------
 1 files changed, 0 insertions(+), 95 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
index f8a74fe..e8997cb 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
@@ -1,14 +1,11 @@
 package com.genersoft.iot.vmp.storager.impl;
 
-import com.genersoft.iot.vmp.common.StreamInfo;
 import com.genersoft.iot.vmp.conf.SipConfig;
 import com.genersoft.iot.vmp.conf.UserSetting;
 import com.genersoft.iot.vmp.gb28181.bean.*;
 import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
 import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
 import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
-import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
-import com.genersoft.iot.vmp.service.IGbStreamService;
 import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
 import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
@@ -28,7 +25,6 @@
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.ObjectUtils;
-import org.springframework.util.StringUtils;
 
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
@@ -92,12 +88,6 @@
 
 	@Autowired
     private PlatformGbStreamMapper platformGbStreamMapper;
-
-	@Autowired
-    private IGbStreamService gbStreamService;
-
-	@Autowired
-    private ParentPlatformMapper parentPlatformMapper;
 
 	/**
 	 * 鏍规嵁璁惧ID鍒ゆ柇璁惧鏄惁瀛樺湪
@@ -297,79 +287,6 @@
 
 		List<Device> deviceList =  deviceMapper.getDevices();
 		return deviceList;
-	}
-
-	/**
-	 * 鍒犻櫎璁惧
-	 *
-	 * @param deviceId 璁惧ID
-	 * @return true锛氬垹闄ゆ垚鍔�  false锛氬垹闄ゅけ璐�
-	 */
-	@Override
-	public boolean delete(String deviceId) {
-		TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
-		boolean result = false;
-		try {
-			platformChannelMapper.delChannelForDeviceId(deviceId);
-			deviceChannelMapper.cleanChannelsByDeviceId(deviceId);
-			if ( deviceMapper.del(deviceId) < 0 ) {
-				//浜嬪姟鍥炴粴
-				dataSourceTransactionManager.rollback(transactionStatus);
-			}
-			result = true;
-			dataSourceTransactionManager.commit(transactionStatus);     //鎵嬪姩鎻愪氦
-		}catch (Exception e) {
-			dataSourceTransactionManager.rollback(transactionStatus);
-		}
-		return result;
-	}
-
-	/**
-	 * 鏇存柊璁惧鍦ㄧ嚎
-	 *
-	 * @param deviceId 璁惧ID
-	 * @return true锛氭洿鏂版垚鍔�  false锛氭洿鏂板け璐�
-	 */
-	@Override
-	public synchronized boolean online(String deviceId) {
-		Device device = deviceMapper.getDeviceByDeviceId(deviceId);
-		if (device == null) {
-			return false;
-		}
-		device.setOnline(1);
-		logger.info("鏇存柊璁惧鍦ㄧ嚎: " + deviceId);
-		redisCatchStorage.updateDevice(device);
-		return deviceMapper.update(device) > 0;
-	}
-
-	/**
-	 * 鏇存柊璁惧绂荤嚎
-	 *
-	 * @param deviceId 璁惧ID
-	 * @return true锛氭洿鏂版垚鍔�  false锛氭洿鏂板け璐�
-	 */
-	@Override
-	public synchronized boolean outline(String deviceId) {
-		logger.info("鏇存柊璁惧绂荤嚎: " + deviceId);
-		Device device = deviceMapper.getDeviceByDeviceId(deviceId);
-		if (device == null) {
-			return false;
-		}
-		device.setOnline(0);
-		redisCatchStorage.updateDevice(device);
-		return deviceMapper.update(device) > 0;
-	}
-
-	/**
-	 * 鏇存柊鎵�鏈夎澶囩绾�
-	 *
-	 * @return true锛氭洿鏂版垚鍔�  false锛氭洿鏂板け璐�
-	 */
-	@Override
-	public synchronized boolean outlineForAll() {
-		logger.info("鏇存柊鎵�鏈夎澶囩绾�");
-		int result = deviceMapper.outlineForAll();
-		return result > 0;
 	}
 
 	/**
@@ -834,18 +751,6 @@
 		return gbStreamMapper.updateStreamGPS(gpsMsgInfos);
 	}
 
-	private List<DeviceChannel> getDeviceChannelListByChannelReduceList(List<ChannelReduce> channelReduces, String catalogId) {
-		List<DeviceChannel> deviceChannelList = new ArrayList<>();
-		if (channelReduces.size() > 0){
-			for (ChannelReduce channelReduce : channelReduces) {
-				DeviceChannel deviceChannel = queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId());
-				deviceChannel.setParental(1);
-				deviceChannel.setParentId(catalogId);
-				deviceChannelList.add(deviceChannel);
-			}
-		}
-		return deviceChannelList;
-	}
 
 	private DeviceChannel getDeviceChannelByCatalog(PlatformCatalog catalog) {
 		ParentPlatform platform = platformMapper.getParentPlatByServerGBId(catalog.getPlatformId());

--
Gitblit v1.8.0