From 299f69a1d2cb8f4f754ce8a02db17d3473c78798 Mon Sep 17 00:00:00 2001 From: Gary Date: Sat, 9 Mar 2024 18:26:07 +0800 Subject: [PATCH] 1.fix method order by field --- luoo_music/src/main/java/com/luoo/music/dao/JournalSongDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luoo_music/src/main/java/com/luoo/music/dao/JournalSongDao.java b/luoo_music/src/main/java/com/luoo/music/dao/JournalSongDao.java index 36fb884..03f6618 100644 --- a/luoo_music/src/main/java/com/luoo/music/dao/JournalSongDao.java +++ b/luoo_music/src/main/java/com/luoo/music/dao/JournalSongDao.java @@ -44,7 +44,7 @@ public interface JournalSongDao extends JpaRepository, JpaSp @Query(value = "select * from tb_journal_song order by rand() limit ?1 ", nativeQuery = true) List 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 orderByField(List idList); List findByJournalNoOrderBySongNo(String journalNo);