1.update cache key

main
Gary 8 months ago
parent d656dae9f1
commit 1047824db2

@ -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";

@ -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());
}
}

@ -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<SongRespDTO> findByJournalNo(String journalNo) {

Loading…
Cancel
Save