From 3c1516c15c618dcbfc3792291cd47fddad20f980 Mon Sep 17 00:00:00 2001 From: Gary Date: Tue, 12 Mar 2024 12:04:07 +0800 Subject: [PATCH] 1.clear cache when publish journal --- .../java/com/luoo/music/controller/CMSJournalController.java | 3 +++ 1 file changed, 3 insertions(+) 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 50a014c..561af8e 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 @@ -73,6 +73,8 @@ public class CMSJournalController { @RequestMapping(value="/publish/{id}",method= RequestMethod.PUT) public Result publish(@ApiParam(value = "期刊ID", required = true) @PathVariable String id, @ApiParam(value = "期刊发布请求对象", required = true) @RequestBody JournalPublishReq queryModel){ + cacheChannel.evict("default", "journal_filter"); + cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); return journalService.publish(id, queryModel); } @@ -80,6 +82,7 @@ public class CMSJournalController { @RequestMapping(value="/update/state/{id}",method= RequestMethod.PUT) public Result updateColumnState(@ApiParam(value = "期刊ID", required = true) @PathVariable String id, @ApiParam(value = "期刊启停状态,0:停用,1:启用", required = true) @RequestBody String state){ + cacheChannel.evict("default", "journal_filter"); cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); return journalService.updateJournalState(id, state); }