优化参数&字典缓存操作
This commit is contained in:
@ -129,19 +129,20 @@ public class SysConfigController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(configService.deleteConfigByIds(ids));
|
||||
configService.deleteConfigByIds(ids);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空缓存
|
||||
* 刷新参数缓存
|
||||
*/
|
||||
@RequiresPermissions("system:config:remove")
|
||||
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
|
||||
@GetMapping("/clearCache")
|
||||
@GetMapping("/refreshCache")
|
||||
@ResponseBody
|
||||
public AjaxResult clearCache()
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
configService.clearCache();
|
||||
configService.resetConfigCache();
|
||||
return success();
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,7 @@ public class SysDictDataController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(dictDataService.deleteDictDataByIds(ids));
|
||||
dictDataService.deleteDictDataByIds(ids);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
|
@ -125,19 +125,20 @@ public class SysDictTypeController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(dictTypeService.deleteDictTypeByIds(ids));
|
||||
dictTypeService.deleteDictTypeByIds(ids);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空缓存
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
@RequiresPermissions("system:dict:remove")
|
||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||
@GetMapping("/clearCache")
|
||||
@GetMapping("/refreshCache")
|
||||
@ResponseBody
|
||||
public AjaxResult clearCache()
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
dictTypeService.clearCache();
|
||||
dictTypeService.resetDictCache();
|
||||
return success();
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
<a class="btn btn-danger" onclick="clearCache()" shiro:hasPermission="system:config:remove">
|
||||
<i class="fa fa-refresh"></i> 清理缓存
|
||||
<a class="btn btn-danger" onclick="refreshCache()" shiro:hasPermission="system:config:remove">
|
||||
<i class="fa fa-refresh"></i> 刷新缓存
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
@ -135,9 +135,9 @@
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/** 清理参数缓存 */
|
||||
function clearCache() {
|
||||
$.operate.get(prefix + "/clearCache");
|
||||
/** 刷新参数缓存 */
|
||||
function refreshCache() {
|
||||
$.operate.get(prefix + "/refreshCache");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@ -50,8 +50,8 @@
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
<a class="btn btn-danger" onclick="clearCache()" shiro:hasPermission="system:dict:remove">
|
||||
<i class="fa fa-refresh"></i> 清理缓存
|
||||
<a class="btn btn-danger" onclick="refreshCache()" shiro:hasPermission="system:dict:remove">
|
||||
<i class="fa fa-refresh"></i> 刷新缓存
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -139,9 +139,9 @@
|
||||
$.modal.openTab("字典数据", url);
|
||||
}
|
||||
|
||||
/** 清理字典缓存 */
|
||||
function clearCache() {
|
||||
$.operate.get(prefix + "/clearCache");
|
||||
/** 刷新字典缓存 */
|
||||
function refreshCache() {
|
||||
$.operate.get(prefix + "/refreshCache");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user