liding
2025-05-26 0050395dfb05425f0a929bc1587b971d78f1e95e
src/main/java/com/ruoyi/project/system/domain/SysRole.java
@@ -1,6 +1,8 @@
package com.ruoyi.project.system.domain;
import java.util.Set;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -31,16 +33,16 @@
    /** 角色排序 */
    @Excel(name = "角色排序")
    private String roleSort;
    private Integer roleSort;
    /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
    @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
    /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */
    @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
    private String dataScope;
    /** 菜单树选择项是否关联显示(0:父子互相关联显示 1:父子不互相关联显示) */
    /** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
    private boolean menuCheckStrictly;
    /** 部门树选择项是否关联显示(0:父子互相关联显示 1:父子不互相关联显示) */
    /** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
    private boolean deptCheckStrictly;
    /** 角色状态(0正常 1停用) */
@@ -58,6 +60,9 @@
    /** 部门组(数据权限) */
    private Long[] deptIds;
    /** 角色菜单权限 */
    private Set<String> permissions;
    public SysRole()
    {
@@ -113,13 +118,13 @@
        this.roleKey = roleKey;
    }
    @NotBlank(message = "显示顺序不能为空")
    public String getRoleSort()
    @NotNull(message = "显示顺序不能为空")
    public Integer getRoleSort()
    {
        return roleSort;
    }
    public void setRoleSort(String roleSort)
    public void setRoleSort(Integer roleSort)
    {
        this.roleSort = roleSort;
    }
@@ -203,7 +208,17 @@
    {
        this.deptIds = deptIds;
    }
    public Set<String> getPermissions()
    {
        return permissions;
    }
    public void setPermissions(Set<String> permissions)
    {
        this.permissions = permissions;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -212,6 +227,8 @@
            .append("roleKey", getRoleKey())
            .append("roleSort", getRoleSort())
            .append("dataScope", getDataScope())
            .append("menuCheckStrictly", isMenuCheckStrictly())
            .append("deptCheckStrictly", isDeptCheckStrictly())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())