mysql
with n(parentid) as
(select menuid
from tsys_menu
where menuid in
#{item}
union all
select parentid
from tsys_menu
where menuid in
#{item}
union all
select nplus.parentid
from tsys_menu as nplus, n
where n.parentid = nplus.menuid)
select distinct parentid from n where parentid is not null
代码如上,如何在mysql中转换