处理收到redis推动的推流设备信息内容重复的问题

This commit is contained in:
648540858
2024-03-13 15:24:09 +08:00
parent 010e73b0c7
commit e1d476a54a
8 changed files with 50 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
@@ -170,4 +171,7 @@ public interface GbStreamMapper {
@Select("SELECT status FROM wvp_stream_push WHERE app=#{app} AND stream=#{stream}")
Boolean selectStatusForPush(@Param("app") String app, @Param("stream") String stream);
@MapKey("gbId")
@Select("SELECT * from wvp_gb_stream")
Map<String, GbStream> getAllGBId();
}

View File

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
@@ -195,4 +196,12 @@ public interface StreamPushMapper {
"</foreach>" +
"</script>")
List<StreamPushItem> getListIn(List<StreamPushItem> streamPushItems);
@MapKey("vhost")
@Select("SELECT CONCAT(wsp.app, wsp.stream) as vhost, wsp.app, wsp.stream, wgs.gb_id, wgs.name " +
" from wvp_stream_push wsp " +
" left join wvp_gb_stream wgs on wgs.app = wsp.app and wgs.stream = wsp.stream")
Map<String, StreamPushItem> getAllAppAndStreamMap();
}