xiangpei
2024-07-05 f21d15ba2d2456946808cf86e904eebe9a5dcba4
部门增加字段
2个文件已修改
21 ■■■■ 已修改文件
src/main/java/com/mindskip/xzs/domain/Department.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/DepartmentMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/mindskip/xzs/domain/Department.java
@@ -14,6 +14,11 @@
    private String name;
    /**
     * 上级部门ID
     */
    private Integer parentId;
    /**
     * 部门管理员
     */
    private List<Integer> adminId;
src/main/resources/mapper/DepartmentMapper.xml
@@ -5,11 +5,12 @@
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="name" jdbcType="VARCHAR" property="name"/>
        <result column="deleted" jdbcType="VARCHAR" property="deleted"/>
        <result column="parent_id" property="parentId"/>
    </resultMap>
    <sql id="Base_Column_List">
        id
        , name,deleted
        , name,deleted,parent_id
    </sql>
    <insert id="add" parameterType="com.mindskip.xzs.domain.Department" useGeneratedKeys="true" keyProperty="id">
@@ -26,6 +27,9 @@
            <if test="adminId != null">
                admin_id = #{adminId},
            </if>
            <if test="parentId != null">
                parent_id = #{parentId},
            </if>
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=VARCHAR},
            </if>
@@ -36,7 +40,8 @@
    <select id="gets" resultMap="BaseResultMap">
        SELECT
            td.id,
            td.name
            td.name,
            td.parent_id
        FROM
            t_department td
        WHERE
@@ -49,7 +54,8 @@
    <select id="getById" resultMap="BaseResultMap">
        SELECT
            td.id,
            td.name
            td.name,
            td.parent_id
        FROM
            t_department td
        WHERE
@@ -83,7 +89,8 @@
            parameterType="com.mindskip.xzs.viewmodel.admin.department.DepartmentResponseVM">
        SELECT
            td.id,
            td.name
            td.name,
            td.parent_id
        FROM
             t_department td
        <where>
@@ -102,6 +109,7 @@
        SELECT
            td.id,
            td.name,
            td.parent_id,
            td.admin_id as adminId,
            tu.real_name as adminName
        FROM