|
@ -11,9 +11,9 @@ import java.util.List; |
|
|
public interface StreamProxyMapper { |
|
|
public interface StreamProxyMapper { |
|
|
|
|
|
|
|
|
@Insert("INSERT INTO stream_proxy (type, app, stream,mediaServerId, url, src_url, dst_url, " + |
|
|
@Insert("INSERT INTO stream_proxy (type, app, stream,mediaServerId, url, src_url, dst_url, " + |
|
|
"timeout_ms, ffmpeg_cmd_key, rtp_type, enable_hls, enable_mp4, enable, enable_remove_none_reader, createTime) VALUES" + |
|
|
"timeout_ms, ffmpeg_cmd_key, rtp_type, enable_hls, enable_mp4, enable, status, enable_remove_none_reader, createTime) VALUES" + |
|
|
"('${type}','${app}', '${stream}', '${mediaServerId}','${url}', '${src_url}', '${dst_url}', " + |
|
|
"('${type}','${app}', '${stream}', '${mediaServerId}','${url}', '${src_url}', '${dst_url}', " + |
|
|
"'${timeout_ms}', '${ffmpeg_cmd_key}', '${rtp_type}', ${enable_hls}, ${enable_mp4}, ${enable}, " + |
|
|
"'${timeout_ms}', '${ffmpeg_cmd_key}', '${rtp_type}', ${enable_hls}, ${enable_mp4}, ${enable}, ${status}, " + |
|
|
"${enable_remove_none_reader}, '${createTime}' )") |
|
|
"${enable_remove_none_reader}, '${createTime}' )") |
|
|
int add(StreamProxyItem streamProxyDto); |
|
|
int add(StreamProxyItem streamProxyDto); |
|
|
|
|
|
|
|
@ -30,6 +30,7 @@ public interface StreamProxyMapper { |
|
|
"rtp_type=#{rtp_type}, " + |
|
|
"rtp_type=#{rtp_type}, " + |
|
|
"enable_hls=#{enable_hls}, " + |
|
|
"enable_hls=#{enable_hls}, " + |
|
|
"enable=#{enable}, " + |
|
|
"enable=#{enable}, " + |
|
|
|
|
|
"status=#{status}, " + |
|
|
"enable_remove_none_reader=#{enable_remove_none_reader}, " + |
|
|
"enable_remove_none_reader=#{enable_remove_none_reader}, " + |
|
|
"enable_mp4=#{enable_mp4} " + |
|
|
"enable_mp4=#{enable_mp4} " + |
|
|
"WHERE app=#{app} AND stream=#{stream}") |
|
|
"WHERE app=#{app} AND stream=#{stream}") |
|
@ -49,8 +50,8 @@ public interface StreamProxyMapper { |
|
|
|
|
|
|
|
|
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " + |
|
|
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " + |
|
|
"LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + |
|
|
"LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + |
|
|
"WHERE st.enable=${enable} and st.mediaServerId = '${id}' order by st.createTime desc") |
|
|
"WHERE st.enable=${enable} and st.status=${status} and st.mediaServerId = '${id}' order by st.createTime desc") |
|
|
List<StreamProxyItem> selectForEnableInMediaServer(String id, boolean enable); |
|
|
List<StreamProxyItem> selectForEnableInMediaServer(String id, boolean enable, boolean status); |
|
|
|
|
|
|
|
|
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " + |
|
|
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " + |
|
|
"LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + |
|
|
"LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + |
|
@ -58,9 +59,14 @@ public interface StreamProxyMapper { |
|
|
List<StreamProxyItem> selectInMediaServer(String id); |
|
|
List<StreamProxyItem> selectInMediaServer(String id); |
|
|
|
|
|
|
|
|
@Update("UPDATE stream_proxy " + |
|
|
@Update("UPDATE stream_proxy " + |
|
|
"SET enable=#{status} " + |
|
|
"SET status=#{status} " + |
|
|
"WHERE mediaServerId=#{mediaServerId}") |
|
|
"WHERE mediaServerId=#{mediaServerId}") |
|
|
void updateStatus(boolean status, String mediaServerId); |
|
|
void updateStatusByMediaServerId(boolean status, String mediaServerId); |
|
|
|
|
|
|
|
|
|
|
|
@Update("UPDATE stream_proxy " + |
|
|
|
|
|
"SET status=${status} " + |
|
|
|
|
|
"WHERE app=#{app} AND stream=#{stream}") |
|
|
|
|
|
int updateStatus(boolean status, String app, String stream); |
|
|
|
|
|
|
|
|
@Delete("DELETE FROM stream_proxy WHERE enable_remove_none_reader=true AND mediaServerId=#{mediaServerId}") |
|
|
@Delete("DELETE FROM stream_proxy WHERE enable_remove_none_reader=true AND mediaServerId=#{mediaServerId}") |
|
|
void deleteAutoRemoveItemByMediaServerId(String mediaServerId); |
|
|
void deleteAutoRemoveItemByMediaServerId(String mediaServerId); |
|
|