fix 修复 错误增加组导致的校验不生效问题

feature/model
疯狂的狮子Li 1 year ago
parent 29118ae78c
commit 3774d71bac

@ -1,14 +1,13 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.system.domain.SysConfig;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysConfig;
/**
* sys_config
@ -24,27 +23,27 @@ public class SysConfigBo extends BaseEntity {
/**
*
*/
@NotNull(message = "参数主键不能为空", groups = { EditGroup.class })
@NotNull(message = "参数主键不能为空")
private Long configId;
/**
*
*/
@NotBlank(message = "参数名称不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "参数名称不能为空")
@Size(min = 0, max = 100, message = "参数名称不能超过{max}个字符")
private String configName;
/**
*
*/
@NotBlank(message = "参数键名不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "参数键名不能为空")
@Size(min = 0, max = 100, message = "参数键名长度不能超过{max}个字符")
private String configKey;
/**
*
*/
@NotBlank(message = "参数键值不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "参数键值不能为空")
@Size(min = 0, max = 500, message = "参数键值长度不能超过{max}个字符")
private String configValue;

@ -1,9 +1,5 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDept;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
@ -11,6 +7,8 @@ import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDept;
/**
* sys_dept
@ -26,7 +24,7 @@ public class SysDeptBo extends BaseEntity {
/**
* id
*/
@NotNull(message = "部门id不能为空", groups = { EditGroup.class })
@NotNull(message = "部门id不能为空")
private Long deptId;
/**
@ -37,7 +35,7 @@ public class SysDeptBo extends BaseEntity {
/**
*
*/
@NotBlank(message = "部门名称不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过{max}个字符")
private String deptName;

@ -1,15 +1,13 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDictData;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDictData;
/**
* sys_dict_data
@ -25,7 +23,7 @@ public class SysDictDataBo extends BaseEntity {
/**
*
*/
@NotNull(message = "字典编码不能为空", groups = { EditGroup.class })
@NotNull(message = "字典编码不能为空")
private Long dictCode;
/**
@ -36,21 +34,21 @@ public class SysDictDataBo extends BaseEntity {
/**
*
*/
@NotBlank(message = "字典标签不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "字典标签不能为空")
@Size(min = 0, max = 100, message = "字典标签长度不能超过{max}个字符")
private String dictLabel;
/**
*
*/
@NotBlank(message = "字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "字典键值不能为空")
@Size(min = 0, max = 100, message = "字典键值长度不能超过{max}个字符")
private String dictValue;
/**
*
*/
@NotBlank(message = "字典类型不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "字典类型不能为空")
@Size(min = 0, max = 100, message = "字典类型长度不能超过{max}个字符")
private String dictType;

@ -1,9 +1,5 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDictType;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@ -11,6 +7,8 @@ import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDictType;
/**
* sys_dict_type
@ -26,20 +24,20 @@ public class SysDictTypeBo extends BaseEntity {
/**
*
*/
@NotNull(message = "字典主键不能为空", groups = { EditGroup.class })
@NotNull(message = "字典主键不能为空")
private Long dictId;
/**
*
*/
@NotBlank(message = "字典名称不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "字典名称不能为空")
@Size(min = 0, max = 100, message = "字典类型名称长度不能超过{max}个字符")
private String dictName;
/**
*
*/
@NotBlank(message = "字典类型不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "字典类型不能为空")
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过{max}个字符")
@Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
private String dictType;

@ -1,16 +1,14 @@
package org.dromara.system.domain.bo;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysMenu;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysMenu;
/**
* sys_menu
@ -26,7 +24,7 @@ public class SysMenuBo extends BaseEntity {
/**
* ID
*/
@NotNull(message = "菜单ID不能为空", groups = { EditGroup.class })
@NotNull(message = "菜单ID不能为空")
private Long menuId;
/**
@ -37,14 +35,14 @@ public class SysMenuBo extends BaseEntity {
/**
*
*/
@NotBlank(message = "菜单名称不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "菜单名称不能为空")
@Size(min = 0, max = 50, message = "菜单名称长度不能超过{max}个字符")
private String menuName;
/**
*
*/
@NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
@NotNull(message = "显示顺序不能为空")
private Integer orderNum;
/**
@ -77,7 +75,7 @@ public class SysMenuBo extends BaseEntity {
/**
* M C F
*/
@NotBlank(message = "菜单类型不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "菜单类型不能为空")
private String menuType;
/**

@ -1,16 +1,14 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.core.xss.Xss;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysNotice;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.xss.Xss;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysNotice;
/**
* sys_notice
@ -26,14 +24,14 @@ public class SysNoticeBo extends BaseEntity {
/**
* ID
*/
@NotNull(message = "公告ID不能为空", groups = { EditGroup.class })
@NotNull(message = "公告ID不能为空")
private Long noticeId;
/**
*
*/
@Xss(message = "公告标题不能包含脚本字符")
@NotBlank(message = "公告标题不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "公告标题不能为空")
@Size(min = 0, max = 50, message = "公告标题不能超过{max}个字符")
private String noticeTitle;

@ -1,15 +1,13 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysPost;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysPost;
/**
* sys_post
@ -25,27 +23,27 @@ public class SysPostBo extends BaseEntity {
/**
* ID
*/
@NotNull(message = "岗位ID不能为空", groups = { EditGroup.class })
@NotNull(message = "岗位ID不能为空")
private Long postId;
/**
*
*/
@NotBlank(message = "岗位编码不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "岗位编码不能为空")
@Size(min = 0, max = 64, message = "岗位编码长度不能超过{max}个字符")
private String postCode;
/**
*
*/
@NotBlank(message = "岗位名称不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "岗位名称不能为空")
@Size(min = 0, max = 50, message = "岗位名称长度不能超过{max}个字符")
private String postName;
/**
*
*/
@NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
@NotNull(message = "显示顺序不能为空")
private Integer postSort;
/**

@ -1,10 +1,5 @@
package org.dromara.system.domain.bo;
import org.dromara.common.core.constant.UserConstants;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysRole;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
@ -12,6 +7,9 @@ import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.dromara.common.core.constant.UserConstants;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysRole;
/**
* sys_role
@ -28,27 +26,27 @@ public class SysRoleBo extends BaseEntity {
/**
* ID
*/
@NotNull(message = "角色ID不能为空", groups = { EditGroup.class })
@NotNull(message = "角色ID不能为空")
private Long roleId;
/**
*
*/
@NotBlank(message = "角色名称不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "角色名称不能为空")
@Size(min = 0, max = 30, message = "角色名称长度不能超过{max}个字符")
private String roleName;
/**
*
*/
@NotBlank(message = "角色权限字符串不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "角色权限字符串不能为空")
@Size(min = 0, max = 100, message = "权限字符长度不能超过{max}个字符")
private String roleKey;
/**
*
*/
@NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
@NotNull(message = "显示顺序不能为空")
private Integer roleSort;
/**

Loading…
Cancel
Save