admin用户增加清理系统功能业务字典缓存的功能
This commit is contained in:
@@ -101,6 +101,12 @@ public class DictController extends BaseController {
|
||||
|
||||
return dictService.getDictByIdWithRelation(id);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"refreshCache"})
|
||||
public String refreshCache(String cacheName){
|
||||
//删除字典缓存
|
||||
CacheUtils.remove(cacheName);
|
||||
return "success";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -197,6 +197,22 @@ function menuHeight(){
|
||||
|
||||
}
|
||||
}
|
||||
function refreshCache(cacheName){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/sys/dict/refreshCache',
|
||||
data:{"cacheName":cacheName},
|
||||
dataType:'text',
|
||||
async:false,
|
||||
success:function(data,textStatus){
|
||||
if(data=="success"){
|
||||
alert("缓存清理成功");
|
||||
}else{
|
||||
alert("缓存清理失败");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.bodyhi{
|
||||
@@ -294,6 +310,21 @@ function menuHeight(){
|
||||
<!-- BEGIN TOP NAVIGATION MENU -->
|
||||
<div class="top-menu">
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<c:if test="${fns:getUser().loginId eq 'admin'}">
|
||||
<li class="dropdown dropdown-user" id="cache">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" >
|
||||
<i class="fa fa-language"></i><span class="username username-hide-on-mobile" id="cache_text"> </span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:refreshCache('functionServiceDict')">refresh function service</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:refreshCache('functionRegionDict')">refresh function region</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</c:if>
|
||||
|
||||
<li class="dropdown dropdown-user" id="language">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user