|
|
@ -1,6 +1,8 @@
|
|
|
|
#namespace("Resource")
|
|
|
|
#namespace("Resource")
|
|
|
|
-- 获取指定节点为根的子树
|
|
|
|
-- 获取指定节点为根的子树
|
|
|
|
#sql("getStructureTree")
|
|
|
|
#sql("getStructureTree")
|
|
|
|
|
|
|
|
SELECT structure_id, parent_id FROM t_resource_structure WHERE structure_id = #para(parent_id)
|
|
|
|
|
|
|
|
UNION ALL
|
|
|
|
SELECT structure_id, parent_id FROM t_resource_structure WHERE parent_id = #para(parent_id)
|
|
|
|
SELECT structure_id, parent_id FROM t_resource_structure WHERE parent_id = #para(parent_id)
|
|
|
|
UNION ALL
|
|
|
|
UNION ALL
|
|
|
|
SELECT b.structure_id, b.parent_id FROM t_resource_structure b
|
|
|
|
SELECT b.structure_id, b.parent_id FROM t_resource_structure b
|
|
|
|