From eacd3e3152d197b8dc8aa8230196b2582c619562 Mon Sep 17 00:00:00 2001 From: Gary Date: Mon, 8 Apr 2024 17:29:38 +0800 Subject: [PATCH] 1.add status filter for recommend --- luoo_music/src/main/java/com/luoo/music/dao/JournalDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luoo_music/src/main/java/com/luoo/music/dao/JournalDao.java b/luoo_music/src/main/java/com/luoo/music/dao/JournalDao.java index 710fc61..c72de8c 100644 --- a/luoo_music/src/main/java/com/luoo/music/dao/JournalDao.java +++ b/luoo_music/src/main/java/com/luoo/music/dao/JournalDao.java @@ -92,7 +92,7 @@ public interface JournalDao extends JpaRepository,JpaSpecificati @Query(value = "select journal_no FROM tb_journal where id=?1", nativeQuery = true) String findJournalNoById(String journalId); - @Query(value = "select tbl.* from (select tbl1.* from indie_music.tb_journal tbl1 order by user_collect_count DESC LIMIT 50) tbl order by rand() limit 8", nativeQuery = true) + @Query(value = "select tbl.* from (select tbl1.* from tb_journal tbl1 where state='1' and is_publish='1' order by user_collect_count DESC LIMIT 50) tbl order by rand() limit 8", nativeQuery = true) List recommend(); }