| | |
| | | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) { |
| | | return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); |
| | | } |
| | | return R.ok(configService.insertConfig(config)); |
| | | configService.insertConfig(config); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) { |
| | | return R.fail("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); |
| | | } |
| | | return R.ok(configService.updateConfig(config)); |
| | | configService.updateConfig(config); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updateByKey") |
| | | public R<Void> updateByKey(@RequestBody SysConfig config) { |
| | | return R.ok(configService.updateConfig(config)); |
| | | configService.updateConfig(config); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |