fix: 配置查询
parent
e4ae9d0c5b
commit
962c2fdd38
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue