疯狂的狮子li
2022-03-04 c1d01fb1e1a0aadab46afd568f61f89bcd8bb9ad
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>