From d09f76ca1ffd2ab091c14327b8e50d92dfa1df7e Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期三, 27 八月 2025 09:49:50 +0800 Subject: [PATCH] 新增应收,台账,改变文件上传方式 --- main-business/src/main/resources/mapper/TreeMapper.xml | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/main-business/src/main/resources/mapper/TreeMapper.xml b/main-business/src/main/resources/mapper/TreeMapper.xml index d9c0ef1..fcedc3f 100644 --- a/main-business/src/main/resources/mapper/TreeMapper.xml +++ b/main-business/src/main/resources/mapper/TreeMapper.xml @@ -23,5 +23,14 @@ update_time, id, name, parent_id </sql> + <select id="listRecursiveSubNodeIds" resultType="java.lang.Long"> + WITH RECURSIVE sub_nodes AS ( + SELECT id FROM tree WHERE parent_id = #{treeId} + UNION ALL + SELECT t.id FROM tree t + JOIN sub_nodes s ON t.parent_id = s.id + ) + SELECT id FROM sub_nodes + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3