BO类去掉@NotNull校验的分组信息

This commit is contained in:
dataprince 2023-10-26 09:31:30 +08:00
parent 716c422a27
commit 1db7b15aab
8 changed files with 19 additions and 35 deletions

View File

@ -1,7 +1,5 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.system.domain.SysConfig;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
@ -29,21 +27,21 @@ public class SysConfigBo extends BaseEntity {
/**
* 参数名称
*/
@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;

View File

@ -1,7 +1,5 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysDept;
import io.github.linpeilie.annotations.AutoMapper;
@ -36,7 +34,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;

View File

@ -1,7 +1,5 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysDictData;
import io.github.linpeilie.annotations.AutoMapper;
@ -34,21 +32,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;

View File

@ -1,7 +1,5 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysDictType;
import io.github.linpeilie.annotations.AutoMapper;
@ -30,14 +28,14 @@ public class SysDictTypeBo extends BaseEntity {
/**
* 字典名称
*/
@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;

View File

@ -1,8 +1,6 @@
package com.ruoyi.system.domain.bo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysMenu;
import io.github.linpeilie.annotations.AutoMapper;
@ -36,14 +34,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;
/**
@ -76,7 +74,7 @@ public class SysMenuBo extends BaseEntity {
/**
* 菜单类型M目录 C菜单 F按钮
*/
@NotBlank(message = "菜单类型不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "菜单类型不能为空")
private String menuType;
/**

View File

@ -1,7 +1,5 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.core.xss.Xss;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysNotice;
@ -31,7 +29,7 @@ public class SysNoticeBo extends BaseEntity {
* 公告标题
*/
@Xss(message = "公告标题不能包含脚本字符")
@NotBlank(message = "公告标题不能为空", groups = { AddGroup.class, EditGroup.class })
@NotBlank(message = "公告标题不能为空")
@Size(min = 0, max = 50, message = "公告标题不能超过{max}个字符")
private String noticeTitle;

View File

@ -1,7 +1,5 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysPost;
import io.github.linpeilie.annotations.AutoMapper;
@ -30,21 +28,21 @@ public class SysPostBo extends BaseEntity {
/**
* 岗位编码
*/
@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;
/**

View File

@ -1,8 +1,6 @@
package com.ruoyi.system.domain.bo;
import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.orm.core.domain.BaseEntity;
import com.ruoyi.system.domain.SysRole;
import io.github.linpeilie.annotations.AutoMapper;
@ -33,21 +31,21 @@ public class SysRoleBo extends BaseEntity {
/**
* 角色名称
*/
@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;
/**