diff --git a/luoo_music/src/main/java/com/luoo/music/dao/JournalTagDao.java b/luoo_music/src/main/java/com/luoo/music/dao/JournalTagDao.java index 10e3c76..ec59206 100644 --- a/luoo_music/src/main/java/com/luoo/music/dao/JournalTagDao.java +++ b/luoo_music/src/main/java/com/luoo/music/dao/JournalTagDao.java @@ -29,7 +29,7 @@ public interface JournalTagDao extends JpaRepository, JpaSpec @Query("DELETE FROM JournalTag jt WHERE jt.journalId = :journalId") int deleteByJournalId(@Param("journalId") String journalId); - @Query(value = "select journal_id FROM tb_journal_tag where tag_id=?1", nativeQuery = true) + @Query(value = "select journal_id FROM tb_journal_tag where tag_id=?1 or tag_id in (select id from tb_tag_info where parent_id=?1)", nativeQuery = true) List getJournalIdByTagId(String tagId);