xiangpei
2024-07-07 5912494a3298c006e47c0d81c8feb59ea978d43c
src/main/resources/mapper/DepartmentMapper.xml
@@ -21,14 +21,12 @@
    <update id="update" parameterType="com.mindskip.xzs.domain.Department">
        update t_department
        <set>
            parent_id = #{parentId},
            <if test="name != null">
                name = #{name,jdbcType=VARCHAR},
            </if>
            <if test="adminId != null">
                admin_id = #{adminId},
            </if>
            <if test="parentId != null">
                parent_id = #{parentId},
            </if>
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=VARCHAR},
@@ -127,4 +125,8 @@
        SELECT count(*) FROM t_department WHERE admin_id = #{userId} AND deleted = 0 AND id != #{id}
    </select>
    <select id="list" resultType="com.mindskip.xzs.domain.vo.CascaderDataVO">
        SELECT id as value, name as label, parent_id FROM t_department WHERE deleted = 0
    </select>
</mapper>