diff --git a/luoo_common/src/main/java/constants/Constants.java b/luoo_common/src/main/java/constants/Constants.java index 52b6545..fcbcb41 100644 --- a/luoo_common/src/main/java/constants/Constants.java +++ b/luoo_common/src/main/java/constants/Constants.java @@ -13,6 +13,7 @@ public class Constants { public static final String J2CACHE_REGION_JOURNAL_QUERY_PAGE = "journal_query_page"; public static final String J2CACHE_REGION_JOURNAL_ID = "journal_id"; public static final String J2CACHE_REGION_JOURNAL_NO = "journal_no"; + public static final String J2CACHE_REGION_JOURNAL_NO_SONG_ID = "journal_song_key"; public static final String J2CACHE_REGION_JOURNAL_SONG_LIST = "journal_song_list"; public static final String J2CACHE_REGION_JOURNAL_COMMENT_PAGE_HOT = "journal_comment_page_hot"; diff --git a/luoo_music/src/main/java/com/luoo/music/dto/mapper/SongMapper.java b/luoo_music/src/main/java/com/luoo/music/dto/mapper/SongMapper.java index 93e17c4..c9f2348 100644 --- a/luoo_music/src/main/java/com/luoo/music/dto/mapper/SongMapper.java +++ b/luoo_music/src/main/java/com/luoo/music/dto/mapper/SongMapper.java @@ -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 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()); - } } diff --git a/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java b/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java index 0d66399..98396d3 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java @@ -115,7 +115,7 @@ public class JournalSongService { } public JournalSong findByJournalNoSongId(String id) { - return (JournalSong) this.cacheChannel.get(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE, id, key -> journalSongDao.findByJournalNoSongId(id) , false).getValue() ; + return (JournalSong) this.cacheChannel.get(Constants.J2CACHE_REGION_JOURNAL_NO_SONG_ID, id, key -> journalSongDao.findByJournalNoSongId(id) , false).getValue() ; } public List findByJournalNo(String journalNo) {