From a084fac7cd2849755ca8990941919ea5288a1201 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Wed, 10 Jul 2024 17:33:04 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=9A=E9=81=93=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../vmp/gb28181/dao/DeviceChannelMapper.java | 58 +++----
.../iot/vmp/gb28181/dao/DeviceMapper.java | 2 +-
.../vmanager/gb28181/device/DeviceQuery.java | 7 +-
web_src/src/components/ChannelEdit.vue | 142 ++++++++++++++++++
web_src/src/components/DeviceList.vue | 17 ++-
web_src/src/components/channelList.vue | 117 +--------------
6 files changed, 199 insertions(+), 144 deletions(-)
create mode 100644 web_src/src/components/ChannelEdit.vue
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java
index 89aa951e..9f08602c 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java
@@ -35,7 +35,7 @@ public interface DeviceChannelMapper {
", device_id=#{deviceId}" +
", device_db_id=#{deviceDbId}" +
", name=#{name}" +
- ", manufacturer#{manufacturer}" +
+ ", manufacturer=#{manufacturer}" +
", model=#{model}" +
", owner=#{owner}" +
", civil_code=#{civilCode}" +
@@ -72,7 +72,7 @@ public interface DeviceChannelMapper {
", has_audio=#{hasAudio}" +
", gps_time=#{gpsTime}" +
", stream_identification=#{streamIdentification}" +
- "WHERE id=#{id}" +
+ " WHERE id=#{id}" +
" "})
int update(DeviceChannel channel);
@@ -112,12 +112,13 @@ public interface DeviceChannelMapper {
", gb_download_speed = #{gbDownloadSpeed}" +
", gb_svc_space_support_mod = #{gbSvcSpaceSupportMod}" +
", gb_svc_time_support_mode = #{gbSvcTimeSupportMode}" +
- "WHERE id = #{id}" +
+ " WHERE id = #{id}" +
" "})
int updateCustomInfo(DeviceChannel channel);
@Select(value = {" "})
int updatePosition(DeviceChannel deviceChannel);
@@ -562,7 +564,7 @@ public interface DeviceChannelMapper {
int getAllChannelCount();
@Select(value = {" "})
DeviceChannel getOne(@Param("id") int id);
@Select(value = {" "})
DeviceChannel getOneByDeviceId(@Param("deviceDbId") int deviceDbId, @Param("channelId") String channelId);
}
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java
index a99aa9dd..380253bc 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java
@@ -338,7 +338,7 @@ public interface DeviceMapper {
" FROM wvp_device de" +
" where 1 = 1 "+
" AND de.on_line=${status}"+
- " AND coalesce(custom_name, name) as name LIKE '%${query}%' " +
+ " AND coalesce(custom_name, name) LIKE '%${query}%' " +
" order by create_time desc "+
" ")
List getDeviceList(@Param("query") String query, @Param("status") Boolean status);
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
index 1b36cdc6..401be794 100755
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
@@ -108,9 +108,10 @@ public class DeviceQuery {
@GetMapping("/devices")
@Options()
public PageInfo devices(int page, int count, String query, Boolean status){
-// if (page == null) page = 0;
-// if (count == null) count = 20;
- return deviceService.getAll(page, count,query, status);
+ if (ObjectUtils.isEmpty(query)){
+ query = null;
+ }
+ return deviceService.getAll(page, count, query, status);
}
/**
diff --git a/web_src/src/components/ChannelEdit.vue b/web_src/src/components/ChannelEdit.vue
new file mode 100644
index 00000000..d5498538
--- /dev/null
+++ b/web_src/src/components/ChannelEdit.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
diff --git a/web_src/src/components/DeviceList.vue b/web_src/src/components/DeviceList.vue
index 5375e5e3..8a41b611 100755
--- a/web_src/src/components/DeviceList.vue
+++ b/web_src/src/components/DeviceList.vue
@@ -3,6 +3,16 @@