1.fix method order by field

main
Gary 9 months ago
parent 61b8366a7d
commit 299f69a1d2

@ -44,7 +44,7 @@ public interface JournalSongDao extends JpaRepository<JournalSong,String>, JpaSp
@Query(value = "select * from tb_journal_song order by rand() limit ?1 ", nativeQuery = true) @Query(value = "select * from tb_journal_song order by rand() limit ?1 ", nativeQuery = true)
List<JournalSong> random(int limit); List<JournalSong> random(int limit);
@Query(value = "select * from tb_journal_song where journal_no_song_id in ?1 order by field(id,?1)", nativeQuery = true) @Query(value = "select * from tb_journal_song where journal_no_song_id in ?1 order by field(journal_no_song_id,?1)", nativeQuery = true)
public List<JournalSong> orderByField(List<String> idList); public List<JournalSong> orderByField(List<String> idList);
List<JournalSong> findByJournalNoOrderBySongNo(String journalNo); List<JournalSong> findByJournalNoOrderBySongNo(String journalNo);

Loading…
Cancel
Save