疯狂的狮子Li
2022-05-20 73e1d3b046402e3ba6ec20bcd695cbdb7cfef9f1
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -37,17 +37,4 @@
        order by d.parent_id, d.order_num
    </select>
    <update id="updateDeptChildren" parameterType="java.util.List">
        update sys_dept set ancestors =
        <foreach collection="depts" item="item" index="index"
                 separator=" " open="case dept_id" close="end">
            when #{item.deptId} then #{item.ancestors}
        </foreach>
        where dept_id in
        <foreach collection="depts" item="item" index="index"
                 separator="," open="(" close=")">
            #{item.deptId}
        </foreach>
    </update>
</mapper>