From 1b44ba33671e27c3d206d875306b226c770b7980 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期五, 15 一月 2021 18:22:57 +0800 Subject: [PATCH] 完成向上级联->点播--002 --- src/main/java/com/genersoft/iot/vmp/storager/dao/PatformChannelMapper.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/PatformChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/PatformChannelMapper.java index c5e9091..a5ee275 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/PatformChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/PatformChannelMapper.java @@ -1,5 +1,6 @@ package com.genersoft.iot.vmp.storager.dao; +import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; @@ -18,7 +19,7 @@ */ @Select("<script> "+ "SELECT deviceAndChannelId FROM platform_gb_channel WHERE platformId='${platformId}' AND deviceAndChannelId in" + - "<foreach collection='deviceAndChannelIds' open='(' item='id_' separator=',' close=')'> '${id_}'</foreach>" + + "<foreach collection='deviceAndChannelIds' open='(' item='id_' separator=',' close=')'> '${id_}'</foreach> ORDER BY deviceAndChannelId ASC" + "</script>") List<String> findChannelRelatedPlatform(String platformId, List<String> deviceAndChannelIds); @@ -39,4 +40,9 @@ "DELETE FROM platform_gb_channel WHERE platformId='${platformId}'" + "</script>") int cleanChannelForGB(String platformId); + + + @Select("SELECT * FROM device_channel WHERE deviceId = (SELECT deviceId FROM platform_gb_channel WHERE " + + "platformId='${platformId}' AND channelId='${channelId}' ) AND channelId='${channelId}'") + DeviceChannel queryChannelInParentPlatform(String platformId, String channelId); } -- Gitblit v1.8.0