浏览代码

机构信息

zhaops 6 年之前
父节点
当前提交
21b09aa332

+ 100 - 14
user-service/src/main/java/com/diagbot/entity/Organization.java

@@ -3,14 +3,16 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-
-import java.io.Serializable;
 import java.util.Date;
+import java.io.Serializable;
 
 /**
- * @Description: 机构信息
- * @Author: ztg
- * @Date: 2018/9/13 16:52
+ * <p>
+ * 机构表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-09-17
  */
 @TableName("sys_organization")
 public class Organization implements Serializable {
@@ -18,7 +20,7 @@ public class Organization implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**
-     * 机构ID
+     * 主键
      */
     @TableId(value = "id", type = IdType.AUTO)
     private Long id;
@@ -53,6 +55,36 @@ public class Organization implements Serializable {
      */
     private String name;
 
+    /**
+     * 机构类型
+     */
+    private Integer type;
+
+    /**
+     * 负责人
+     */
+    private String principal;
+
+    /**
+     * 机构地址
+     */
+    private String address;
+
+    /**
+     * 上级机构id
+     */
+    private Long parentId;
+
+    /**
+     * 下属机构数量
+     */
+    private Integer subNum;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
 
     public Long getId() {
         return id;
@@ -110,16 +142,70 @@ public class Organization implements Serializable {
         this.name = name;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getPrincipal() {
+        return principal;
+    }
+
+    public void setPrincipal(String principal) {
+        this.principal = principal;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public Integer getSubNum() {
+        return subNum;
+    }
+
+    public void setSubNum(Integer subNum) {
+        this.subNum = subNum;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
     @Override
     public String toString() {
         return "Organization{" +
-                "id=" + id +
-                ", isDeleted='" + isDeleted + '\'' +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator='" + creator + '\'' +
-                ", modifier='" + modifier + '\'' +
-                ", name='" + name + '\'' +
-                '}';
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", type=" + type +
+        ", principal=" + principal +
+        ", address=" + address +
+        ", parentId=" + parentId +
+        ", subNum=" + subNum +
+        ", remark=" + remark +
+        "}";
     }
 }

+ 6 - 0
user-service/src/main/resources/mapper/OrganizationMapper.xml

@@ -11,6 +11,12 @@
         <result column="creator" property="creator" />
         <result column="modifier" property="modifier" />
         <result column="name" property="name" />
+        <result column="type" property="type" />
+        <result column="principal" property="principal" />
+        <result column="address" property="address" />
+        <result column="parent_id" property="parentId" />
+        <result column="sub_num" property="subNum" />
+        <result column="remark" property="remark" />
     </resultMap>
 
     <select id="getByUserId" resultMap="BaseResultMap">