From 9442c37ce73497a66d540f035e58201b54656e49 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 15 二月 2022 17:41:09 +0800 Subject: [PATCH] 优化级联添加通道流程 --- src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java index e4639e7..1e15360 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java @@ -5,6 +5,7 @@ import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog; import com.genersoft.iot.vmp.gb28181.bean.PlatformGbStream; import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; +import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; @@ -18,6 +19,17 @@ @Insert("REPLACE INTO platform_gb_stream (app, stream, platformId, catalogId) VALUES" + "('${app}', '${stream}', '${platformId}', '${catalogId}')") int add(PlatformGbStream platformGbStream); + + + @Insert("<script> " + + "REPLACE into platform_gb_stream " + + "(app, stream, platformId, catalogId) " + + "values " + + "<foreach collection='streamPushItems' index='index' item='item' separator=','> " + + "('${item.app}', '${item.stream}', '${platformId}', '${catalogId}')" + + "</foreach> " + + "</script>") + int batchAdd(String platformId, String catalogId, List<StreamPushItem> streamPushItems); @Delete("DELETE FROM platform_gb_stream WHERE app=#{app} AND stream=#{stream}") int delByAppAndStream(String app, String stream); @@ -82,4 +94,7 @@ "</foreach>" + "</script>") void delByGbStreams(List<GbStream> gbStreams); + + + } -- Gitblit v1.8.0