|
@ -86,9 +86,9 @@ public class SysConfigController extends BaseController { |
|
|
@Log(title = "参数管理", businessType = BusinessType.INSERT) |
|
|
@Log(title = "参数管理", businessType = BusinessType.INSERT) |
|
|
@PostMapping |
|
|
@PostMapping |
|
|
public R<Void> add(@Validated @RequestBody SysConfigBo config) { |
|
|
public R<Void> add(@Validated @RequestBody SysConfigBo config) { |
|
|
if (!configService.checkConfigKeyUnique(config)) { |
|
|
/*if (!configService.checkConfigKeyUnique(config)) { |
|
|
return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); |
|
|
return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); |
|
|
} |
|
|
}*/ |
|
|
configService.insertConfig(config); |
|
|
configService.insertConfig(config); |
|
|
return R.ok(); |
|
|
return R.ok(); |
|
|
} |
|
|
} |
|
@ -100,9 +100,9 @@ public class SysConfigController extends BaseController { |
|
|
@Log(title = "参数管理", businessType = BusinessType.UPDATE) |
|
|
@Log(title = "参数管理", businessType = BusinessType.UPDATE) |
|
|
@PutMapping |
|
|
@PutMapping |
|
|
public R<Void> edit(@Validated @RequestBody SysConfigBo config) { |
|
|
public R<Void> edit(@Validated @RequestBody SysConfigBo config) { |
|
|
if (!configService.checkConfigKeyUnique(config)) { |
|
|
/*if (!configService.checkConfigKeyUnique(config)) { |
|
|
return R.fail("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); |
|
|
return R.fail("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); |
|
|
} |
|
|
}*/ |
|
|
configService.updateConfig(config); |
|
|
configService.updateConfig(config); |
|
|
return R.ok(); |
|
|
return R.ok(); |
|
|
} |
|
|
} |
|
|