24282 hace 2 años
padre
commit
08c9b7e62f

+ 50 - 24
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java

@@ -3,8 +3,6 @@ package com.ruoyi.common.core.domain.entity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.ruoyi.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 
 import javax.validation.constraints.Email;
 import javax.validation.constraints.NotBlank;
@@ -28,6 +26,11 @@ public class SysDept extends BaseEntity {
     private Long deptId;
 
     /**
+     * 机构类型
+     */
+    private Integer type;
+
+    /**
      * 父部门ID
      */
     private Long parentId;
@@ -48,9 +51,14 @@ public class SysDept extends BaseEntity {
     private Integer orderNum;
 
     /**
-     * 负责人
+     * 负责人id
+     */
+    private Long leaderId;
+
+    /**
+     * 总监id
      */
-    private String leader;
+    private Long directorId;
 
     /**
      * 联系电话
@@ -132,12 +140,20 @@ public class SysDept extends BaseEntity {
         this.orderNum = orderNum;
     }
 
-    public String getLeader() {
-        return leader;
+    public Long getLeaderId() {
+        return leaderId;
+    }
+
+    public void setLeaderId(Long leaderId) {
+        this.leaderId = leaderId;
     }
 
-    public void setLeader(String leader) {
-        this.leader = leader;
+    public Long getDirectorId() {
+        return directorId;
+    }
+
+    public void setDirectorId(Long directorId) {
+        this.directorId = directorId;
     }
 
     @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
@@ -199,23 +215,33 @@ public class SysDept extends BaseEntity {
         this.tenantId = tenantId;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("deptId", getDeptId())
-                .append("parentId", getParentId())
-                .append("ancestors", getAncestors())
-                .append("deptName", getDeptName())
-                .append("orderNum", getOrderNum())
-                .append("leader", getLeader())
-                .append("phone", getPhone())
-                .append("email", getEmail())
-                .append("status", getStatus())
-                .append("delFlag", getDelFlag())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .toString();
+        return "SysDept{" +
+                "deptId=" + deptId +
+                ", type=" + type +
+                ", parentId=" + parentId +
+                ", ancestors='" + ancestors + '\'' +
+                ", deptName='" + deptName + '\'' +
+                ", orderNum=" + orderNum +
+                ", leaderId=" + leaderId +
+                ", directorId=" + directorId +
+                ", phone='" + phone + '\'' +
+                ", email='" + email + '\'' +
+                ", status='" + status + '\'' +
+                ", delFlag='" + delFlag + '\'' +
+                ", tenantId='" + tenantId + '\'' +
+                ", parentName='" + parentName + '\'' +
+                ", children=" + children +
+                '}';
     }
+
 }

+ 3 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java

@@ -88,16 +88,19 @@ public class SysRole extends BaseEntity {
     /**
      * 菜单组
      */
+    @TableField(exist = false)
     private Long[] menuIds;
 
     /**
      * 部门组(数据权限)
      */
+    @TableField(exist = false)
     private Long[] deptIds;
 
     /**
      * 角色菜单权限
      */
+    @TableField(exist = false)
     private Set<String> permissions;
 
     public SysRole() {