From e1fcc1f21f6622871a5507fcd50aacfa99181879 Mon Sep 17 00:00:00 2001
From: 64850858 <648540858@qq.com>
Date: 星期四, 08 七月 2021 14:48:00 +0800
Subject: [PATCH] 补充swf文件
---
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
index 7e206bf..bbe8c2b 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
@@ -1,8 +1,8 @@
package com.genersoft.iot.vmp.storager.impl;
+import java.text.SimpleDateFormat;
import java.util.*;
-import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
@@ -70,6 +70,8 @@
@Autowired
private VideoStreamSessionManager streamSession;
+ private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
/**
* 鏍规嵁璁惧ID鍒ゆ柇璁惧鏄惁瀛樺湪
@@ -103,8 +105,11 @@
*/
@Override
public synchronized boolean updateDevice(Device device) {
+ String now = this.format.format(new Date(System.currentTimeMillis()));
+ device.setUpdateTime(now);
Device deviceByDeviceId = deviceMapper.getDeviceByDeviceId(device.getDeviceId());
if (deviceByDeviceId == null) {
+ device.setCreateTime(now);
return deviceMapper.add(device) > 0;
}else {
return deviceMapper.update(device) > 0;
@@ -117,8 +122,11 @@
String channelId = channel.getChannelId();
channel.setDeviceId(deviceId);
channel.setStreamId(streamSession.getStreamId(deviceId, channel.getChannelId()));
+ String now = this.format.format(new Date(System.currentTimeMillis()));
+ channel.setUpdateTime(now);
DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(deviceId, channelId);
if (deviceChannel == null) {
+ channel.setCreateTime(now);
deviceChannelMapper.add(channel);
}else {
deviceChannelMapper.update(channel);
@@ -254,6 +262,18 @@
if (device == null) return false;
device.setOnline(0);
return deviceMapper.update(device) > 0;
+ }
+
+ /**
+ * 鏇存柊鎵�鏈夎澶囩绾�
+ *
+ * @return true锛氭洿鏂版垚鍔� false锛氭洿鏂板け璐�
+ */
+ @Override
+ public synchronized boolean outlineForAll() {
+ logger.info("鏇存柊鎵�鏈夎澶囩绾�");
+ int result = deviceMapper.outlineForAll();
+ return result > 0;
}
/**
@@ -575,5 +595,8 @@
gbStreamMapper.setStatus(app, streamId, false);
}
-
+ @Override
+ public void updateParentPlatformStatus(String platformGbID, boolean online) {
+ platformMapper.updateParentPlatformStatus(platformGbID, online);
+ }
}
--
Gitblit v1.8.0