| | |
| | | @GetMapping(value = "/{configId}")
|
| | | public AjaxResult getInfo(@PathVariable Long configId)
|
| | | {
|
| | | return AjaxResult.success(configService.selectConfigById(configId));
|
| | | return success(configService.selectConfigById(configId));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @GetMapping(value = "/configKey/{configKey}")
|
| | | public AjaxResult getConfigKey(@PathVariable String configKey)
|
| | | {
|
| | | return AjaxResult.success(configService.selectConfigByKey(configKey));
|
| | | return success(configService.selectConfigByKey(configKey));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | {
|
| | | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
|
| | | {
|
| | | return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
| | | return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
| | | }
|
| | | config.setCreateBy(getUsername());
|
| | | return toAjax(configService.insertConfig(config));
|
| | |
| | | {
|
| | | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
|
| | | {
|
| | | return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
| | | return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
| | | }
|
| | | config.setUpdateBy(getUsername());
|
| | | return toAjax(configService.updateConfig(config));
|
| | |
| | | public AjaxResult refreshCache()
|
| | | {
|
| | | configService.resetConfigCache();
|
| | | return AjaxResult.success();
|
| | | return success();
|
| | | }
|
| | | }
|