From 58d7980ea2d60a5bcaf57ee3eb60435137b4c100 Mon Sep 17 00:00:00 2001 From: Gary Date: Tue, 27 Feb 2024 23:47:10 +0800 Subject: [PATCH] 1.enable level 2 category for search --- luoo_music/src/main/java/com/luoo/music/dao/JournalTagDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);