|
|
|
@ -33,24 +33,4 @@ public class SongMapper {
|
|
|
|
|
public static SongRespDTO getSongRespDTO(JournalSong song) {
|
|
|
|
|
return getSongRespDTO(song, Collections.emptySet());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static SongRespDTO getSongRespDTO(SongInfo song, Set<String> songCollectSet) {
|
|
|
|
|
SongRespDTO songRespDTO = new SongRespDTO();
|
|
|
|
|
songRespDTO.setAlbum(song.getAlbum());
|
|
|
|
|
songRespDTO.setArtist(song.getArtist());
|
|
|
|
|
songRespDTO.setId(song.getId());
|
|
|
|
|
songRespDTO.setTitle(song.getName());
|
|
|
|
|
songRespDTO.setSrc(Constants.SONG_RESOURCE_PREFIX + song.getUrl());
|
|
|
|
|
songRespDTO.setPic(Constants.SONG_RESOURCE_PREFIX + song.getImage());
|
|
|
|
|
String lyric=song.getLyricUrl();
|
|
|
|
|
if(!StringTools.isEmpty(lyric)) {
|
|
|
|
|
songRespDTO.setLrc(Constants.SONG_RESOURCE_PREFIX + lyric);
|
|
|
|
|
}
|
|
|
|
|
songRespDTO.setHaveCollect(songCollectSet.contains(songRespDTO.getId()));
|
|
|
|
|
return songRespDTO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static SongRespDTO getSongRespDTO(SongInfo song) {
|
|
|
|
|
return getSongRespDTO(song, Collections.emptySet());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|