648540858
2024-03-28 1de344674afd6bb35b51b165bbad76dbe6299b7e
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java
@@ -16,7 +16,7 @@
@Repository
public interface PlatformGbStreamMapper {
    @Insert("REPLACE INTO wvp_platform_gb_stream (gb_stream_id, platform_id, catalog_id) VALUES" +
    @Insert("INSERT INTO wvp_platform_gb_stream (gb_stream_id, platform_id, catalog_id) VALUES" +
            "( #{gbStreamId}, #{platformId}, #{catalogId})")
    int add(PlatformGbStream platformGbStream);
@@ -53,11 +53,14 @@
            "WHERE gs.app=#{app} AND gs.stream=#{stream} AND pgs.platform_id=#{platformId}")
    StreamProxyItem selectOne(@Param("app") String app, @Param("stream") String stream, @Param("platformId") String platformId);
    @Select("select gs.* \n" +
            "from wvp_gb_stream gs\n" +
    @Select("<script> " +
            "select gs.* " +
            " from wvp_gb_stream gs\n" +
            "    left join wvp_platform_gb_stream pgs\n" +
            "        on gs.gb_stream_id = pgs.gb_stream_id\n" +
            "where pgs.platform_id=#{platformId} and pgs.catalog_id=#{catalogId}")
            " where pgs.platform_id=#{platformId} " +
            " <if test='catalogId != null' > and pgs.catalog_id=#{catalogId}</if>" +
            "</script>")
    List<GbStream> queryChannelInParentPlatformAndCatalog(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
    @Select("select gs.gb_id as id, gs.name as name, pgs.platform_id as platform_id, pgs.catalog_id as catalog_id , 0 as children_count, 2 as type\n" +
@@ -103,6 +106,9 @@
            "</script>")
    void delByAppAndStreamsByPlatformId(@Param("gbStreams") List<GbStream> gbStreams, @Param("platformId") String platformId);
    @Delete("DELETE from wvp_platform_gb_stream WHERE platform_id=#{platformId} and catalog_id=#{catalogId}")
    @Delete("<script> "+
            "DELETE from wvp_platform_gb_stream WHERE platform_id=#{platformId}" +
            " <if test='catalogId != null' >  and catalog_id=#{catalogId}</if>" +
            "</script>")
    int delByPlatformAndCatalogId(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
}