fix: 配置查询

V0.5.x
jay 2023-06-13 19:27:39 +08:00
parent e4ae9d0c5b
commit 962c2fdd38
2 changed files with 3 additions and 5 deletions

View File

@ -68,8 +68,8 @@ public class SysConfigController extends BaseController {
@ApiOperation("根据参数键名查询参数值")
@PostMapping(value = "/getConfigKey")
public void getConfigKey(@RequestBody @Validated Request<String> request) {
configService.selectConfigByKey(request.getData());
public String getConfigKey(@RequestBody @Validated Request<String> request) {
return configService.selectConfigByKey(request.getData());
}

View File

@ -61,9 +61,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
*/
@Override
public String selectConfigByKey(String configKey) {
SysConfig data = new SysConfig();
data.setConfigKey(configKey);
SysConfig sysConfig = sysConfigData.findOneByCondition(data);
SysConfig sysConfig = sysConfigData.findByConfigKey(configKey);
if (ObjectUtil.isNotNull(sysConfig)) {
return sysConfig.getConfigValue();
}