mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
!215 使用Spring Cache注解优化缓存
This commit is contained in:
@ -82,7 +82,7 @@ public class SysConfigController extends BaseController {
|
||||
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
|
||||
return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
||||
}
|
||||
return toAjax(configService.insertConfig(config));
|
||||
return R.ok(configService.insertConfig(config));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,7 +95,7 @@ public class SysConfigController extends BaseController {
|
||||
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
|
||||
return R.fail("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
||||
}
|
||||
return toAjax(configService.updateConfig(config));
|
||||
return R.ok(configService.updateConfig(config));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,7 +105,7 @@ public class SysConfigController extends BaseController {
|
||||
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateByKey")
|
||||
public R<Void> updateByKey(@RequestBody SysConfig config) {
|
||||
return toAjax(configService.updateConfig(config));
|
||||
return R.ok(configService.updateConfig(config));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,8 @@ public class SysDictDataController extends BaseController {
|
||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody SysDictData dict) {
|
||||
return toAjax(dictDataService.insertDictData(dict));
|
||||
dictDataService.insertDictData(dict);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,7 +97,8 @@ public class SysDictDataController extends BaseController {
|
||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody SysDictData dict) {
|
||||
return toAjax(dictDataService.updateDictData(dict));
|
||||
dictDataService.updateDictData(dict);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,8 @@ public class SysDictTypeController extends BaseController {
|
||||
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
|
||||
return R.fail("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
return toAjax(dictTypeService.insertDictType(dict));
|
||||
dictTypeService.insertDictType(dict);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,7 +86,8 @@ public class SysDictTypeController extends BaseController {
|
||||
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
|
||||
return R.fail("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
return toAjax(dictTypeService.updateDictType(dict));
|
||||
dictTypeService.updateDictType(dict);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user