|
|
|
@ -66,6 +66,8 @@ public class CMSJournalController {
|
|
|
|
|
public Result update(@ApiParam(value = "期刊ID", required = true) @PathVariable String id,
|
|
|
|
|
@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_NO,journalService.findJournalNoById(id));
|
|
|
|
|
return journalService.update(id, updateModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -75,6 +77,8 @@ public class CMSJournalController {
|
|
|
|
|
@ApiParam(value = "期刊发布请求对象", required = true) @RequestBody JournalPublishReq queryModel){
|
|
|
|
|
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_NO,journalService.findJournalNoById(id));
|
|
|
|
|
return journalService.publish(id, queryModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -83,6 +87,8 @@ public class CMSJournalController {
|
|
|
|
|
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.evict(constants.Constants.J2CACHE_REGION_JOURNAL_ID, 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);
|
|
|
|
|
}
|
|
|
|
@ -91,6 +97,8 @@ public class CMSJournalController {
|
|
|
|
|
@RequestMapping(value="/{id}", method= RequestMethod.DELETE)
|
|
|
|
|
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_NO,journalService.findJournalNoById(id));
|
|
|
|
|
cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_QUERY_PAGE);
|
|
|
|
|
return journalService.deleteById(id);
|
|
|
|
|
}
|
|
|
|
|