Yaml字符串转Json

时间:2025-04-05 09:13:57
mysql根据父节点递归查询所有子节点

码出一片天丫: select dept_id from ( 2 select t1.dept_id,t1.parent_id, 3 if(find_in_set(parent_id, @pids) > 0, @pids := concat(@pids, ',', dept_id), 0) as ischild 4 from ( 5 select dept_id,parent_id from sys_dept t where t.del_flag = '0' order by parent_id, dept_id 6 ) t1, 7 (select @pids := 要查询的节点id) t2 union all select dept_id,parent_id from sys_dept where org_brnch_code=要查询的节点id 8 ) t3 where ischild != 0; order by ischild