为推流列表增加批量移除功能

This commit is contained in:
648540858
2022-02-07 18:30:43 +08:00
parent e0028a87cb
commit d07a5680f3
11 changed files with 145 additions and 22 deletions

View File

@@ -84,6 +84,14 @@ public interface GbStreamMapper {
"</script>")
void batchDel(List<StreamProxyItem> streamProxyItemList);
@Delete("<script> "+
"DELETE FROM gb_stream where " +
"<foreach collection='gbStreams' item='item' separator='or'>" +
"(app=#{item.app} and stream=#{item.stream}) " +
"</foreach>" +
"</script>")
void batchDelForGbStream(List<GbStream> gbStreams);
@Insert("<script> " +
"REPLACE into gb_stream " +
"(app, stream, gbId, name, " +

View File

@@ -74,4 +74,12 @@ public interface PlatformGbStreamMapper {
@Delete("DELETE FROM platform_gb_stream WHERE app=#{app} AND stream=#{stream} AND platformId=#{platformId}")
int delByAppAndStreamAndPlatform(String app, String stream, String platformId);
@Delete("<script> "+
"DELETE FROM platform_gb_stream where " +
"<foreach collection='gbStreams' item='item' separator='or'>" +
"(app=#{item.app} and stream=#{item.stream}) " +
"</foreach>" +
"</script>")
void delByGbStreams(List<GbStream> gbStreams);
}

View File

@@ -1,5 +1,6 @@
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.springframework.stereotype.Repository;
@@ -48,7 +49,13 @@ public interface StreamPushMapper {
"</script>")
int delAll(List<StreamPushItem> streamPushItems);
@Delete("<script> "+
"DELETE FROM stream_push where " +
"<foreach collection='gbStreams' item='item' separator='or'>" +
"(app=#{item.app} and stream=#{item.stream}) " +
"</foreach>" +
"</script>")
int delAllForGbStream(List<GbStream> gbStreams);
@Select(value = {" <script>" +