Browse Source

feat: [系统管理] [部门管理] 增加缩写

master
memorylkf 3 months ago
parent
commit
1a32c3f38f
2 changed files with 18 additions and 2 deletions
  1. +13
    -1
      hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysDept.java
  2. +5
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 13
- 1
hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/domain/SysDept.java View File

@ -54,6 +54,9 @@ public class SysDept extends BaseEntity
/** 组织类型:1部门,3学科,5小组 */
private Integer type;
/** 缩写 */
private String abbr;
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
@ -201,7 +204,8 @@ public class SysDept extends BaseEntity
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("type", getType())
.append("type", getType())
.append("abbr", getAbbr())
.toString();
}
@ -212,4 +216,12 @@ public class SysDept extends BaseEntity
public void setType(Integer type) {
this.type = type;
}
public String getAbbr() {
return abbr;
}
public void setAbbr(String abbr) {
this.abbr = abbr;
}
}

+ 5
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysDeptMapper.xml View File

@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="type" column="type" />
<result property="abbr" column="abbr" />
</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, d.type
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.type, d.abbr
from sys_dept d
</sql>
@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="type != null and type != 0">`type`,</if>
<if test="abbr != null and abbr != ''">`abbr`,</if>
create_time
)values(
<if test="deptId != null and deptId != 0">#{deptId},</if>
@ -112,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="type != null and type != 0">#{type},</if>
<if test="abbr != null and abbr != ''">#{abbr},</if>
sysdate()
)
</insert>
@ -129,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="type != null and type != 0">`type` = #{type},</if>
<if test="abbr != null and abbr != ''">`abbr` = #{abbr},</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}

Loading…
Cancel
Save