docs: 配置key改为配置键

配置key改为配置键
This commit is contained in:
胡少翔
2024-07-31 09:25:42 +08:00
parent 52fc374ad6
commit dbf9cca78f
5 changed files with 8 additions and 8 deletions

View File

@@ -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 = "配置值")

View File

@@ -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 = "配置值不能为空")

View File

@@ -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 = "配置值")

View File

@@ -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);

View File

@@ -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