diff --git a/luoo_common/src/main/java/constants/Constants.java b/luoo_common/src/main/java/constants/Constants.java index 38b9fb4..9d1a300 100644 --- a/luoo_common/src/main/java/constants/Constants.java +++ b/luoo_common/src/main/java/constants/Constants.java @@ -13,7 +13,6 @@ 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_SONG_KEY = "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/controller/CMSJournalController.java b/luoo_music/src/main/java/com/luoo/music/controller/CMSJournalController.java index 28a57ab..ad29d3c 100644 --- a/luoo_music/src/main/java/com/luoo/music/controller/CMSJournalController.java +++ b/luoo_music/src/main/java/com/luoo/music/controller/CMSJournalController.java @@ -67,6 +67,7 @@ public class CMSJournalController { @ApiParam(value = "期刊信息", required = true) @RequestBody JournalAddModel updateModel){ cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_ID, id); + cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_SONG_LIST, id); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_NO,journalService.findJournalNoById(id)); return journalService.update(id, updateModel); } @@ -78,6 +79,7 @@ public class CMSJournalController { cacheChannel.evict("default", "journal_filter"); cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_ID, id); + cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_SONG_LIST, id); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_NO,journalService.findJournalNoById(id)); return journalService.publish(id, queryModel); } @@ -88,6 +90,7 @@ public class CMSJournalController { @ApiParam(value = "期刊启停状态,0:停用,1:启用", required = true) @RequestBody String state){ cacheChannel.evict("default", "journal_filter"); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_ID, id); + cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_SONG_LIST, id); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_NO,journalService.findJournalNoById(id)); cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); return journalService.updateJournalState(id, state); @@ -98,6 +101,7 @@ public class CMSJournalController { public Result delete(@ApiParam(value = "期刊ID", required = true) @PathVariable String id){ cacheChannel.evict("default", "journal_filter"); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_ID, id); + cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_SONG_LIST, id); cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_NO,journalService.findJournalNoById(id)); cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); return journalService.deleteById(id); diff --git a/luoo_music/src/main/java/com/luoo/music/listener/CleanJournalQueryPageListener.java b/luoo_music/src/main/java/com/luoo/music/listener/CleanJournalQueryPageListener.java index 3d00ef9..7222ae7 100644 --- a/luoo_music/src/main/java/com/luoo/music/listener/CleanJournalQueryPageListener.java +++ b/luoo_music/src/main/java/com/luoo/music/listener/CleanJournalQueryPageListener.java @@ -34,6 +34,7 @@ public class CleanJournalQueryPageListener { String journalQueryPageKey = getJournalQueryPageKey(optional.get()); cacheChannel.evict(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE, journalQueryPageKey); cacheChannel.evict(Constants.J2CACHE_REGION_JOURNAL_ID,journalId); + cacheChannel.evict(constants.Constants.J2CACHE_REGION_JOURNAL_SONG_LIST, journalId); cacheChannel.evict(Constants.J2CACHE_REGION_JOURNAL_NO,optional.get().getJournalNo()); }