From 47abdde3392f2c5fd88d382ae63c4756b97ed4b0 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 03 六月 2022 16:24:11 +0800
Subject: [PATCH] 解决设备上线停止线程导致的报错,优化录像的获取以及通道的更新

---
 src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
index 97cf2cc..37d951e 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -99,4 +99,9 @@
 
     @Update("UPDATE device SET online=0")
     int outlineForAll();
+
+    @Select("SELECT * FROM device WHERE online = 1")
+    List<Device> getOnlineDevices();
+    @Select("SELECT * FROM device WHERE ip = #{host} AND port=${port}")
+    Device getDeviceByHostAndPort(String host, int port);
 }

--
Gitblit v1.8.0