From 850260ec286c22738902d7e7c54c1c63c7b76302 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 02 十二月 2022 15:15:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java | 88 --------------------------------------------
1 files changed, 0 insertions(+), 88 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..377b20f 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,13 +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;
@@ -28,7 +26,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;
@@ -297,79 +294,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 +758,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