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

2.X
疯狂的狮子Li 1 year ago
parent ab03ad969a
commit 0489dc81bb

@ -5,8 +5,6 @@ import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
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.SysClient;
@ -25,7 +23,7 @@ public class SysClientBo extends BaseEntity {
/**
* id
*/
@NotNull(message = "id不能为空", groups = { EditGroup.class })
@NotNull(message = "id不能为空")
private Long id;
/**
@ -36,19 +34,19 @@ public class SysClientBo extends BaseEntity {
/**
* key
*/
@NotBlank(message = "客户端key不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "客户端key不能为空")
private String clientKey;
/**
*
*/
@NotBlank(message = "客户端秘钥不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "客户端秘钥不能为空")
private String clientSecret;
/**
*
*/
@NotNull(message = "授权类型不能为空", groups = { AddGroup.class, EditGroup.class })
@NotNull(message = "授权类型不能为空")
private List<String> grantTypeList;
/**

@ -1,15 +1,14 @@
package org.dromara.system.domain.bo;
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.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysConfig;
import jakarta.validation.constraints.*;
/**
* 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,15 +1,15 @@
package org.dromara.system.domain.bo;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.Email;
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.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDept;
import jakarta.validation.constraints.*;
/**
* sys_dept
*
@ -24,7 +24,7 @@ public class SysDeptBo extends BaseEntity {
/**
* id
*/
@NotNull(message = "部门id不能为空", groups = { EditGroup.class })
@NotNull(message = "部门id不能为空")
private Long deptId;
/**
@ -35,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,17 +1,14 @@
package org.dromara.system.domain.bo;
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.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysDictData;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
/**
* sys_dict_data
*
@ -26,7 +23,7 @@ public class SysDictDataBo extends BaseEntity {
/**
*
*/
@NotNull(message = "字典编码不能为空", groups = { EditGroup.class })
@NotNull(message = "字典编码不能为空")
private Long dictCode;
/**
@ -37,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,17 +1,14 @@
package org.dromara.system.domain.bo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
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 jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
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
@ -27,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;

@ -2,17 +2,14 @@ package org.dromara.system.domain.bo;
import com.fasterxml.jackson.annotation.JsonInclude;
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.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysMenu;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
/**
* sys_menu
*
@ -27,7 +24,7 @@ public class SysMenuBo extends BaseEntity {
/**
* ID
*/
@NotNull(message = "菜单ID不能为空", groups = { EditGroup.class })
@NotNull(message = "菜单ID不能为空")
private Long menuId;
/**
@ -38,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;
/**
@ -78,7 +75,7 @@ public class SysMenuBo extends BaseEntity {
/**
* M C F
*/
@NotBlank(message = "菜单类型不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "菜单类型不能为空")
private String menuType;
/**

@ -1,18 +1,15 @@
package org.dromara.system.domain.bo;
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.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.xss.Xss;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysNotice;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
/**
* sys_notice
*
@ -27,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,17 +1,14 @@
package org.dromara.system.domain.bo;
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.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.system.domain.SysPost;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
/**
* sys_post
*
@ -26,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,19 +1,16 @@
package org.dromara.system.domain.bo;
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 lombok.NoArgsConstructor;
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 jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
/**
* sys_role
*
@ -29,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