1.fix lost song

main
Gary 10 months ago
parent 7678d17655
commit 27612348a9

@ -417,7 +417,7 @@ public class CMSJournalService {
journalSongDao.deleteByJournalNo(journalNo); journalSongDao.deleteByJournalNo(journalNo);
List<SongInfo> songList = songDao.orderByField(updateSongs); List<SongInfo> songList = songDao.orderByField(updateSongs);
List<JournalSong> updatedJournalSong = new ArrayList<>(); List<JournalSong> updatedJournalSong = new ArrayList<>();
for (int i = 1; i < songList.size(); i++) { for (int i = 0; i < songList.size(); i++) {
SongInfo song = songList.get(i); SongInfo song = songList.get(i);
JournalSong journalSong = new JournalSong(); JournalSong journalSong = new JournalSong();
journalSong.setId(String.valueOf(idWorker.nextId())); journalSong.setId(String.valueOf(idWorker.nextId()));
@ -429,7 +429,7 @@ public class CMSJournalService {
journalSong.setLyricUrl(Constants.SONG_KEY_PREFIX+song.getLyricUrl()); journalSong.setLyricUrl(Constants.SONG_KEY_PREFIX+song.getLyricUrl());
journalSong.setSongId(song.getId()); journalSong.setSongId(song.getId());
journalSong.setJournalNo(journalNo); journalSong.setJournalNo(journalNo);
journalSong.setSongNo(i); journalSong.setSongNo(i+1);
updatedJournalSong.add(journalSong); updatedJournalSong.add(journalSong);
} }

Loading…
Cancel
Save