【8.0】【config】整理config代码

pull/57/head
fengshuonan 2023-07-10 20:52:33 +08:00
parent 6cd3117c16
commit 826787f901
2 changed files with 24 additions and 26 deletions

View File

@ -26,16 +26,14 @@ package cn.stylefeng.roses.kernel.config.modular.pojo.param;
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest.batchDelete;
import cn.stylefeng.roses.kernel.validator.api.validators.flag.FlagValue;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Set;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Set;
/**
*
@ -103,7 +101,7 @@ public class SysConfigParam extends BaseRequest {
private String groupCode;
/**
* id
* configId
*/
@NotEmpty(message = "configId集合不能为空", groups = batchDelete.class)
@ChineseDescription("configId集合用在批量删除")

View File

@ -326,7 +326,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
}
// 2.不能删除系统参数
if (YesOrNotEnum.Y.getCode().equals(configId)) {
if (YesOrNotEnum.Y.getCode().equals(sysConfig.getSysFlag())) {
throw new ConfigException(ConfigExceptionEnum.CONFIG_SYS_CAN_NOT_DELETE);
}