From 1db7b15aab1752178e42d52730d92e2f38ee0dc4 Mon Sep 17 00:00:00 2001 From: dataprince Date: Thu, 26 Oct 2023 09:31:30 +0800 Subject: [PATCH] =?UTF-8?q?BO=E7=B1=BB=E5=8E=BB=E6=8E=89@NotNull=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E7=9A=84=E5=88=86=E7=BB=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/system/domain/bo/SysConfigBo.java | 8 +++----- .../main/java/com/ruoyi/system/domain/bo/SysDeptBo.java | 4 +--- .../java/com/ruoyi/system/domain/bo/SysDictDataBo.java | 8 +++----- .../java/com/ruoyi/system/domain/bo/SysDictTypeBo.java | 6 ++---- .../main/java/com/ruoyi/system/domain/bo/SysMenuBo.java | 8 +++----- .../main/java/com/ruoyi/system/domain/bo/SysNoticeBo.java | 4 +--- .../main/java/com/ruoyi/system/domain/bo/SysPostBo.java | 8 +++----- .../main/java/com/ruoyi/system/domain/bo/SysRoleBo.java | 8 +++----- 8 files changed, 19 insertions(+), 35 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysConfigBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysConfigBo.java index e3f495f..a2efd8d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysConfigBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysConfigBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java index 0658c02..684712a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictDataBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictDataBo.java index 6d167fd..f61db25 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictDataBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictDataBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictTypeBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictTypeBo.java index 85c31c4..76a70c7 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictTypeBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDictTypeBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java index 660b2d6..2670191 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java @@ -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; /** diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysNoticeBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysNoticeBo.java index 7305d54..358afa0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysNoticeBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysNoticeBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java index 2e69830..9a1d2cf 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java @@ -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; /** diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java index 0106993..e2e2755 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java @@ -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; /**