From 5fe71955f30bd4342b7ba5149831c438773be343 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期二, 22 四月 2025 14:23:38 +0800
Subject: [PATCH] 部门表增加orgCode字段

---
 aps-api/aps-api-system/src/main/java/com/aps/system/api/domain/SysDept.java |   11 +++++++++++
 aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml   |    8 +++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/aps-api/aps-api-system/src/main/java/com/aps/system/api/domain/SysDept.java b/aps-api/aps-api-system/src/main/java/com/aps/system/api/domain/SysDept.java
index 49e771d..52ad60d 100644
--- a/aps-api/aps-api-system/src/main/java/com/aps/system/api/domain/SysDept.java
+++ b/aps-api/aps-api-system/src/main/java/com/aps/system/api/domain/SysDept.java
@@ -51,6 +51,8 @@
 
     /** 鐖堕儴闂ㄥ悕绉� */
     private String parentName;
+
+    private String orgCode;
     
     /** 瀛愰儴闂� */
     private List<SysDept> children = new ArrayList<SysDept>();
@@ -181,6 +183,14 @@
         this.children = children;
     }
 
+    public String getOrgCode() {
+        return orgCode;
+    }
+
+    public void setOrgCode(String orgCode) {
+        this.orgCode = orgCode;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -198,6 +208,7 @@
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
+            .append("orgCode", getOrgCode())
             .toString();
     }
 }
diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
index c4db34b..e6a6945 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -20,10 +20,13 @@
 		<result property="createTime" column="create_time" />
 		<result property="updateBy"   column="update_by"   />
 		<result property="updateTime" column="update_time" />
+		<result property="orgCode"    column="org_code"      />
 	</resultMap>
 	
 	<sql id="selectDeptVo">
-        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time 
+        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
+               d.del_flag, d.create_by, d.create_time ,
+               d.org_code
         from sys_dept d
     </sql>
     
@@ -97,6 +100,7 @@
  			<if test="email != null and email != ''">email,</if>
  			<if test="status != null">status,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
+			<if test="orgCode != null and orgCode != ''">org_code,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -109,6 +113,7 @@
  			<if test="email != null and email != ''">#{email},</if>
  			<if test="status != null">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
+			<if test="orgCode != null and orgCode != ''">#{orgCode},</if>
  			now()
  		)
 	</insert>
@@ -125,6 +130,7 @@
  			<if test="email != null">email = #{email},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+			<if test="orgCode != null and orgCode != ''">org_code = #{orgCode},</if>
  			update_time = now()
  		</set>
  		where dept_id = #{deptId}

--
Gitblit v1.9.3