docs: 配置key改为配置键
配置key改为配置键
This commit is contained in:
@@ -21,7 +21,7 @@ public class SysConfig extends BaseEntity {
|
|||||||
@Schema(description = "配置名称")
|
@Schema(description = "配置名称")
|
||||||
private String configName;
|
private String configName;
|
||||||
|
|
||||||
@Schema(description = "配置key")
|
@Schema(description = "配置键")
|
||||||
private String configKey;
|
private String configKey;
|
||||||
|
|
||||||
@Schema(description = "配置值")
|
@Schema(description = "配置值")
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ public class ConfigForm implements Serializable {
|
|||||||
@Schema(description = "配置名称")
|
@Schema(description = "配置名称")
|
||||||
private String configName;
|
private String configName;
|
||||||
|
|
||||||
@NotBlank(message = "配置key不能为空")
|
@NotBlank(message = "配置键不能为空")
|
||||||
@Schema(description = "配置key")
|
@Schema(description = "配置键")
|
||||||
private String configKey;
|
private String configKey;
|
||||||
|
|
||||||
@NotBlank(message = "配置值不能为空")
|
@NotBlank(message = "配置值不能为空")
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class ConfigVO {
|
|||||||
@Schema(description = "配置名称")
|
@Schema(description = "配置名称")
|
||||||
private String configName;
|
private String configName;
|
||||||
|
|
||||||
@Schema(description = "配置key")
|
@Schema(description = "配置键")
|
||||||
private String configKey;
|
private String configKey;
|
||||||
|
|
||||||
@Schema(description = "配置值")
|
@Schema(description = "配置值")
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public interface SysConfigService extends IService<SysConfig> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取系统配置
|
* 获取系统配置
|
||||||
* @param key 配置key
|
* @param key 配置键
|
||||||
* @return 配置value
|
* @return 配置value
|
||||||
*/
|
*/
|
||||||
Object getSystemConfig(String key);
|
Object getSystemConfig(String key);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean save(ConfigForm configForm) {
|
public boolean save(ConfigForm configForm) {
|
||||||
Assert.isTrue(super.count(new QueryWrapper<SysConfig>().eq("config_key", configForm.getConfigKey())) == 0, "配置key已存在");
|
Assert.isTrue(super.count(new QueryWrapper<SysConfig>().eq("config_key", configForm.getConfigKey())) == 0, "配置键已存在");
|
||||||
SysConfig sysConfig = sysConfigConverter.toEntity(configForm);
|
SysConfig sysConfig = sysConfigConverter.toEntity(configForm);
|
||||||
sysConfig.setCreateBy(SecurityUtils.getUserId());
|
sysConfig.setCreateBy(SecurityUtils.getUserId());
|
||||||
sysConfig.setIsDeleted(SystemConstants.NOT_DELETED_STATUS);
|
sysConfig.setIsDeleted(SystemConstants.NOT_DELETED_STATUS);
|
||||||
@@ -90,7 +90,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean edit(Long id, ConfigForm configForm) {
|
public boolean edit(Long id, ConfigForm configForm) {
|
||||||
Assert.isTrue(super.count(new QueryWrapper<SysConfig>().eq("config_key", configForm.getConfigKey()).ne("id", id)) == 0, "配置key已存在");
|
Assert.isTrue(super.count(new QueryWrapper<SysConfig>().eq("config_key", configForm.getConfigKey()).ne("id", id)) == 0, "配置键已存在");
|
||||||
SysConfig sysConfig = sysConfigConverter.toEntity(configForm);
|
SysConfig sysConfig = sysConfigConverter.toEntity(configForm);
|
||||||
sysConfig.setUpdateBy(SecurityUtils.getUserId());
|
sysConfig.setUpdateBy(SecurityUtils.getUserId());
|
||||||
return this.update(sysConfig, new QueryWrapper<SysConfig>().eq("id", id));
|
return this.update(sysConfig, new QueryWrapper<SysConfig>().eq("id", id));
|
||||||
@@ -127,7 +127,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取系统配置
|
* 获取系统配置
|
||||||
* @param key 配置key
|
* @param key 配置键
|
||||||
* @return 配置value
|
* @return 配置value
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user