with recursive p as (select t1.* from device_record t1 WHERE t1.id = #{vo.id}//前端传的参数 union all select t2.* from device_record t2 inner join p on t2.pid=p.id ) select id,name,pid,status from p where 你想要的数据条件
递归查询孩子,想要什么数据都可以
最新推荐文章于 2024-07-14 14:59:27 发布