select
t.id,t.task_name as taskName,
case
when exists(
select
1
from
base_plan_task t1
where
t.id = t1.parent_id) then 0
else 1
end as isLeaf
from
base_plan_task t where t.tenant_id = 'sy' and t.is_delete = 0
sql判断是否是叶子节点
最新推荐文章于 2023-03-29 23:13:21 发布