tangzy
2021-07-26 a05af1da676dac2cb8a952a38f40d93be626cbf7
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -151,6 +151,7 @@
                        dept.is_deleted = 0
                    <if test="parentId!=null and parentId!=''">
                        and dept_category=1
                        AND dept.id = #{parentId}
                    </if>
            )
@@ -171,6 +172,7 @@
                where 1=1
                <if test="parentId!=null and parentId!=''">
                    and dept_category=1
                    AND bu.dept_id = #{parentId}
                </if>
            )
        )c
@@ -245,4 +247,9 @@
        SELECT id FROM blade_dept WHERE parent_id =#{id} and is_deleted = 0
    </select>
    <insert id="add" parameterType="org.springblade.modules.system.entity.Dept" useGeneratedKeys="true" keyProperty="id">
        insert into blade_dept(tenant_id, parent_id,ancestors,dept_category,dept_name) values(#{tenantId}, #{parentId}, #{ancestors}, #{deptCategory}, #{deptName})
    </insert>
</mapper>