1.add status filter for recommend

main
Gary 10 months ago
parent df6dcab4d8
commit eacd3e3152

@ -92,7 +92,7 @@ public interface JournalDao extends JpaRepository<Journal,String>,JpaSpecificati
@Query(value = "select journal_no FROM tb_journal where id=?1", nativeQuery = true) @Query(value = "select journal_no FROM tb_journal where id=?1", nativeQuery = true)
String findJournalNoById(String journalId); 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<Journal> recommend(); List<Journal> recommend();
} }

Loading…
Cancel
Save