From 27612348a927cadef12c9cbe32f350d8fb2b42eb Mon Sep 17 00:00:00 2001 From: Gary Date: Thu, 8 Feb 2024 00:36:57 +0800 Subject: [PATCH] 1.fix lost song --- .../main/java/com/luoo/music/service/CMSJournalService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java index 778f9b1..7bd5e8a 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java @@ -417,7 +417,7 @@ public class CMSJournalService { journalSongDao.deleteByJournalNo(journalNo); List songList = songDao.orderByField(updateSongs); List updatedJournalSong = new ArrayList<>(); - for (int i = 1; i < songList.size(); i++) { + for (int i = 0; i < songList.size(); i++) { SongInfo song = songList.get(i); JournalSong journalSong = new JournalSong(); journalSong.setId(String.valueOf(idWorker.nextId())); @@ -429,7 +429,7 @@ public class CMSJournalService { journalSong.setLyricUrl(Constants.SONG_KEY_PREFIX+song.getLyricUrl()); journalSong.setSongId(song.getId()); journalSong.setJournalNo(journalNo); - journalSong.setSongNo(i); + journalSong.setSongNo(i+1); updatedJournalSong.add(journalSong); }