|
|
@ -441,8 +441,16 @@ public class CMSJournalService {
|
|
|
|
Map<String,String> songId2JournalSongIdMap=journalSongs.stream().collect(Collectors.toMap(JournalSong::getSongId, JournalSong::getId));
|
|
|
|
Map<String,String> songId2JournalSongIdMap=journalSongs.stream().collect(Collectors.toMap(JournalSong::getSongId, JournalSong::getId));
|
|
|
|
|
|
|
|
|
|
|
|
List<JournalSong> updatedJournalSong = new ArrayList<>();
|
|
|
|
List<JournalSong> updatedJournalSong = new ArrayList<>();
|
|
|
|
for (int i = 0; i < songList.size(); i++) {
|
|
|
|
// for (int i = 0; i < songList.size(); i++) { update: zjb from:gary 歌曲保存顺序问题
|
|
|
|
SongInfo song = songList.get(i);
|
|
|
|
// SongInfo song = songList.get(i);
|
|
|
|
|
|
|
|
for (int i = 0; i < param.getSongs().size(); i++) {
|
|
|
|
|
|
|
|
int finalI = i;
|
|
|
|
|
|
|
|
SongInfo song = songList.stream()
|
|
|
|
|
|
|
|
.filter(e -> e.getId().equals(param.getSongs().get(finalI)))
|
|
|
|
|
|
|
|
.findFirst().orElse(null);
|
|
|
|
|
|
|
|
if(null == song){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
JournalSong journalSong = new JournalSong();
|
|
|
|
JournalSong journalSong = new JournalSong();
|
|
|
|
|
|
|
|
|
|
|
|
journalSong.setId(songId2JournalSongIdMap.getOrDefault(song.getId(), String.valueOf(idWorker.nextId())));
|
|
|
|
journalSong.setId(songId2JournalSongIdMap.getOrDefault(song.getId(), String.valueOf(idWorker.nextId())));
|
|
|
|