| | |
| | | @Delete("DELETE FROM gb_stream WHERE app=#{app} AND stream=#{stream}") |
| | | int del(String app, String stream); |
| | | |
| | | @Select("SELECT gs.*, pgs.platformId AS platformId, pgs.catalogId AS catalogId FROM gb_stream gs " + |
| | | "LEFT JOIN platform_gb_stream pgs ON gs.app = pgs.app AND gs.stream = pgs.stream AND (pgs.platformId = #{platformId} OR pgs.platformId is null)" + |
| | | "order by gs.id asc ") |
| | | List<GbStream> selectAll(String platformId); |
| | | @Select("<script> "+ |
| | | "SELECT gs.*, pgs.platformId AS platformId, pgs.catalogId AS catalogId FROM gb_stream gs " + |
| | | "LEFT JOIN platform_gb_stream pgs ON gs.app = pgs.app AND gs.stream = pgs.stream " + |
| | | "WHERE " + |
| | | "1=1 " + |
| | | " <if test='catalogId != null'> AND pgs.platformId = #{platformId} AND pgs.catalogId = #{catalogId}</if> " + |
| | | " <if test='catalogId == null'> AND pgs.platformId is null AND pgs.catalogId is null</if> " + |
| | | " <if test='query != null'> AND (gs.app LIKE '%${query}%' OR gs.stream LIKE '%${query}%' OR gs.gbId LIKE '%${query}%' OR gs.name LIKE '%${query}%')</if> " + |
| | | " <if test='pushing == true' > AND gs.status=1</if>" + |
| | | " <if test='pushing == false' > AND gs.status=0</if>" + |
| | | " <if test='mediaServerId != null' > AND gs.mediaServerId=#{mediaServerId} </if>" + |
| | | " order by gs.id asc " + |
| | | "</script>") |
| | | List<GbStream> selectAll(String platformId, String catalogId, String query, Boolean pushing, String mediaServerId); |
| | | |
| | | @Select("SELECT * FROM gb_stream WHERE app=#{app} AND stream=#{stream}") |
| | | StreamProxyItem selectOne(String app, String stream); |