根据redis消息更新推流列表

This commit is contained in:
jiang
2022-08-18 16:17:23 +08:00
parent b67841b319
commit 8f77d0c25c
9 changed files with 130 additions and 2 deletions

View File

@@ -148,4 +148,14 @@ public interface GbStreamMapper {
"SET mediaServerId=#{mediaServerId}" +
"WHERE app=#{app} AND stream=#{stream}")
void updateMediaServer(String app, String stream, String mediaServerId);
@Update("<script> "+
" <foreach collection='list' item='item' index='index' separator=';'>"+
"UPDATE gb_stream " +
" SET name=#{item.name},"+
" gbId=#{item.gbId}"+
" WHERE app=#{item.app} and stream=#{item.stream}"+
"</foreach>"+
"</script>")
int updateGbIdOrName(List<StreamPushItem> streamPushItemForUpdate);
}

View File

@@ -168,4 +168,7 @@ public interface StreamPushMapper {
@Update("UPDATE stream_push SET status=0")
void setAllStreamOffline();
@Select("SELECT CONCAT(app,stream) FROM gb_stream")
List<String> getAllAppAndStream();
}