1.clear cache when publish journal

main
Gary 9 months ago
parent 3512799de1
commit 3c1516c15c

@ -73,6 +73,8 @@ public class CMSJournalController {
@RequestMapping(value="/publish/{id}",method= RequestMethod.PUT) @RequestMapping(value="/publish/{id}",method= RequestMethod.PUT)
public Result publish(@ApiParam(value = "期刊ID", required = true) @PathVariable String id, public Result publish(@ApiParam(value = "期刊ID", required = true) @PathVariable String id,
@ApiParam(value = "期刊发布请求对象", required = true) @RequestBody JournalPublishReq queryModel){ @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); return journalService.publish(id, queryModel);
} }
@ -80,6 +82,7 @@ public class CMSJournalController {
@RequestMapping(value="/update/state/{id}",method= RequestMethod.PUT) @RequestMapping(value="/update/state/{id}",method= RequestMethod.PUT)
public Result updateColumnState(@ApiParam(value = "期刊ID", required = true) @PathVariable String id, public Result updateColumnState(@ApiParam(value = "期刊ID", required = true) @PathVariable String id,
@ApiParam(value = "期刊启停状态0:停用1:启用", required = true) @RequestBody String state){ @ApiParam(value = "期刊启停状态0:停用1:启用", required = true) @RequestBody String state){
cacheChannel.evict("default", "journal_filter");
cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE); cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE);
return journalService.updateJournalState(id, state); return journalService.updateJournalState(id, state);
} }

Loading…
Cancel
Save