Merge branch 'wvp-28181-2.0' into wvp-pro-record

# Conflicts:
#	src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformChannelMapper.java
#	web_src/src/components/control.vue
This commit is contained in:
648540858
2022-03-01 22:07:01 +08:00
39 changed files with 569 additions and 247 deletions

View File

@@ -74,7 +74,7 @@ public interface DeviceMapper {
"<if test=\"keepaliveTime != null\">, keepaliveTime='${keepaliveTime}'</if>" +
"<if test=\"expires != null\">, expires=${expires}</if>" +
"<if test=\"charset != null\">, charset='${charset}'</if>" +
"<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=#{subscribeCycleForCatalog}</if>" +
"<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=${subscribeCycleForCatalog}</if>" +
"WHERE deviceId='${deviceId}'"+
" </script>"})
int update(Device device);

View File

@@ -34,7 +34,6 @@ public interface PlatformChannelMapper {
"</script>")
int addChannels(String platformId, List<ChannelReduce> channelReducesToAdd);
@Delete("<script> "+
"DELETE FROM platform_gb_channel WHERE platformId='${platformId}' AND deviceChannelId in" +
"<foreach collection='channelReducesToDel' item='item' open='(' separator=',' close=')' > '${item.id}'</foreach>" +
@@ -42,7 +41,11 @@ public interface PlatformChannelMapper {
int delChannelForGB(String platformId, List<ChannelReduce> channelReducesToDel);
@Delete("<script> "+
"DELETE FROM platform_gb_channel WHERE deviceId='${deviceId}' " +
"DELETE FROM platform_gb_channel WHERE deviceChannelId in " +
"( select temp.deviceChannelId from " +
"(select pgc.deviceChannelId from platform_gb_channel pgc " +
"left join device_channel dc on dc.id = pgc.deviceChannelId where dc.deviceId =#{deviceId} " +
") temp)" +
"</script>")
int delChannelForDeviceId(String deviceId);
@@ -51,18 +54,19 @@ public interface PlatformChannelMapper {
"</script>")
int cleanChannelForGB(String platformId);
@Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE " +
"pgc.platformId=#{platformId} AND dc.channelId=#{channelId}")
@Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE dc.channelId='${channelId}' and pgc.platformId='${platformId}'")
DeviceChannel queryChannelInParentPlatform(String platformId, String channelId);
@Select("select dc.channelId as id, dc.name as name, pgc.platformId as platformId, pgc.catalogId as parentId, 0 as childrenCount, 1 as type " +
"from device_channel dc left join platform_gb_channel pgc on dc.deviceId = pgc.deviceId and dc.channelId = pgc.channelId " +
"from device_channel dc left join platform_gb_channel pgc on dc.id = pgc.deviceChannelId" +
"where pgc.platformId=#{platformId} and pgc.catalogId=#{catalogId}")
List<PlatformCatalog> queryChannelInParentPlatformAndCatalog(String platformId, String catalogId);
@Select("SELECT * FROM device WHERE deviceId = (SELECT deviceId FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE pgc.platformId='${platformId}' AND dc.channelId='${channelId}')")
@Select("select d.*\n" +
"from platform_gb_channel pgc\n" +
" left join device_channel dc on dc.id = pgc.deviceChannelId\n" +
" left join device d on dc.deviceId = d.deviceId\n" +
"where dc.channelId = #{channelId} and pgc.platformId=#{platformId}")
Device queryVideoDeviceByPlatformIdAndChannelId(String platformId, String channelId);
@Delete("<script> "+

View File

@@ -3,7 +3,7 @@ package com.genersoft.iot.vmp.storager.dao;
import com.genersoft.iot.vmp.gb28181.bean.GbStream;
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
import org.apache.ibatis.annotations.*;
import org.omg.PortableInterceptor.INACTIVE;
// import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.stereotype.Repository;
import java.util.Collection;