|
@@ -205,6 +205,18 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void updateConfigByKey(String configKey, String configValue) {
|
|
|
+ SysConfig sysConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getConfigKey, configKey));
|
|
|
+ if (sysConfig == null) {
|
|
|
+ sysConfig = new SysConfig();
|
|
|
+ }
|
|
|
+
|
|
|
+ sysConfig.setConfigKey(configKey);
|
|
|
+ sysConfig.setConfigValue(configValue);
|
|
|
+ baseMapper.insertOrUpdate(sysConfig);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 根据参数 key 获取参数值
|
|
|
*
|