From be9533dead08b4370f87d74b47b7428ead05268d Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 14 六月 2022 15:10:52 +0800
Subject: [PATCH] 增加版本号
---
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java | 39 ++++++++++++---------------------------
1 files changed, 12 insertions(+), 27 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
index f04b7c0..6db08d1 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
@@ -1,7 +1,7 @@
package com.genersoft.iot.vmp.storager.dao;
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
-import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree;
+import com.genersoft.iot.vmp.gb28181.bean.DeviceChannelInPlatform;
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
@@ -67,7 +67,7 @@
" <if test='online == false' > AND dc.status=0</if>" +
" <if test='hasSubChannel == true' > AND dc.subCount > 0 </if>" +
" <if test='hasSubChannel == false' > AND dc.subCount = 0 </if>" +
- "GROUP BY dc.channelId " +
+ "ORDER BY dc.channelId " +
" </script>"})
List<DeviceChannel> queryChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online);
@@ -105,7 +105,7 @@
" <if test='online == true' > AND dc.status=1</if> " +
" <if test='online == false' > AND dc.status=0</if> " +
" <if test='hasSubChannel!= null and hasSubChannel == true' > AND dc.subCount > 0</if> " +
- " <if test='hasSubChannel!= null and hasSubChannel == false' > AND dc.subCount == 0</if> " +
+ " <if test='hasSubChannel!= null and hasSubChannel == false' > AND dc.subCount = 0</if> " +
" <if test='catalogId == null ' > AND dc.id not in (select deviceChannelId from platform_gb_channel where platformId=#{platformId} ) </if> " +
" <if test='catalogId != null ' > AND pgc.platformId = #{platformId} and pgc.catalogId=#{catalogId} </if> " +
" ORDER BY dc.deviceId, dc.channelId ASC" +
@@ -114,22 +114,15 @@
@Select(value = {" <script>" +
"SELECT " +
- " dc.id,\n" +
- " dc.channelId,\n" +
- " dc.deviceId,\n" +
- " dc.name,\n" +
- " de.manufacturer,\n" +
- " de.hostAddress,\n" +
- " dc.subCount,\n" +
+ " dc.*,\n" +
" pgc.platformId as platformId,\n" +
" pgc.catalogId as catalogId " +
" FROM device_channel dc " +
- " LEFT JOIN device de ON dc.deviceId = de.deviceId " +
" LEFT JOIN platform_gb_channel pgc on pgc.deviceChannelId = dc.id " +
" WHERE pgc.platformId = #{platformId} " +
" ORDER BY dc.deviceId, dc.channelId ASC" +
" </script>"})
- List<ChannelReduce> queryChannelByPlatformId(String platformId);
+ List<DeviceChannelInPlatform> queryChannelByPlatformId(String platformId);
@Select("SELECT * FROM device_channel WHERE channelId=#{channelId}")
@@ -242,21 +235,6 @@
@Select("SELECT * FROM device_channel WHERE deviceId=#{deviceId} AND status=1")
List<DeviceChannel> queryOnlineChannelsByDeviceId(String deviceId);
- @Select(" SELECT\n" +
- " id,\n" +
- " channelId,\n" +
- " deviceId,\n" +
- " parentId,\n" +
- " status,\n" +
- " name as title,\n" +
- " channelId as \"value\",\n" +
- " channelId as \"key\",\n" +
- " longitude,\n" +
- " latitude\n" +
- " from device_channel\n" +
- " where deviceId = #{deviceId}")
- List<DeviceChannelTree> tree(String deviceId);
-
@Delete(value = {" <script>" +
"DELETE " +
"from " +
@@ -276,4 +254,11 @@
" where deviceId = #{deviceId} " +
" and channelId = #{channelId}")
int updateChannelSubCount(String deviceId, String channelId);
+
+ @Update(value = {"UPDATE device_channel SET latitude=${latitude}, longitude=${longitude} WHERE deviceId=#{deviceId} AND channelId=#{channelId}"})
+ void updatePotion(String deviceId, String channelId, double longitude, double latitude);
+
+ @Select("SELECT * FROM device_channel WHERE length(trim(streamId)) > 0")
+ List<DeviceChannel> getAllChannelInPlay();
+
}
--
Gitblit v1.8.0