From 3774d71bac896fb62e547cc006a554f631375727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 23 Oct 2023 15:54:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E5=AF=BC=E8=87=B4=E7=9A=84=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/system/domain/bo/SysConfigBo.java | 17 ++++++++--------- .../org/dromara/system/domain/bo/SysDeptBo.java | 10 ++++------ .../dromara/system/domain/bo/SysDictDataBo.java | 14 ++++++-------- .../dromara/system/domain/bo/SysDictTypeBo.java | 12 +++++------- .../org/dromara/system/domain/bo/SysMenuBo.java | 14 ++++++-------- .../dromara/system/domain/bo/SysNoticeBo.java | 12 +++++------- .../org/dromara/system/domain/bo/SysPostBo.java | 14 ++++++-------- .../org/dromara/system/domain/bo/SysRoleBo.java | 16 +++++++--------- 8 files changed, 47 insertions(+), 62 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysConfigBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysConfigBo.java index 757af85f..56c40faa 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysConfigBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysConfigBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDeptBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDeptBo.java index 613977dc..9b2951e8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDeptBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDeptBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictDataBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictDataBo.java index 70f06283..24a86c17 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictDataBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictDataBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictTypeBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictTypeBo.java index c121d24a..90294fe3 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictTypeBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysDictTypeBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysMenuBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysMenuBo.java index 203b8233..751a49ad 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysMenuBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysMenuBo.java @@ -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; /** diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysNoticeBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysNoticeBo.java index e94366b8..6a004f28 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysNoticeBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysNoticeBo.java @@ -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; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysPostBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysPostBo.java index 7bb176bd..1a5160aa 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysPostBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysPostBo.java @@ -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; /** diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysRoleBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysRoleBo.java index 94fb31ec..788973ca 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysRoleBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysRoleBo.java @@ -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; /**