优化参数&字典缓存操作

This commit is contained in:
RuoYi
2021-05-27 17:38:44 +08:00
parent 6fa3bfe051
commit af9cfb40a4
14 changed files with 155 additions and 92 deletions

View File

@ -118,18 +118,19 @@ public class SysConfigController extends BaseController
@DeleteMapping("/{configIds}")
public AjaxResult remove(@PathVariable Long[] configIds)
{
return toAjax(configService.deleteConfigByIds(configIds));
configService.deleteConfigByIds(configIds);
return success();
}
/**
* 清空缓存
* 刷新参数缓存
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
@DeleteMapping("/clearCache")
public AjaxResult clearCache()
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
configService.clearCache();
configService.resetConfigCache();
return AjaxResult.success();
}
}

View File

@ -115,6 +115,7 @@ public class SysDictDataController extends BaseController
@DeleteMapping("/{dictCodes}")
public AjaxResult remove(@PathVariable Long[] dictCodes)
{
return toAjax(dictDataService.deleteDictDataByIds(dictCodes));
dictDataService.deleteDictDataByIds(dictCodes);
return success();
}
}

View File

@ -104,18 +104,19 @@ public class SysDictTypeController extends BaseController
@DeleteMapping("/{dictIds}")
public AjaxResult remove(@PathVariable Long[] dictIds)
{
return toAjax(dictTypeService.deleteDictTypeByIds(dictIds));
dictTypeService.deleteDictTypeByIds(dictIds);
return success();
}
/**
* 清空缓存
* 刷新字典缓存
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
@DeleteMapping("/clearCache")
public AjaxResult clearCache()
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
dictTypeService.clearCache();
dictTypeService.resetDictCache();
return AjaxResult.success();
}