@Select("WITH RECURSIVE topDict AS (" +
"select A.* " +
" FROM base.t00_dict A " +
" WHERE A.parent_dict_id = #{dictId} " +
" UNION SELECT B.* FROM base.t00_dict B " +
" INNER JOIN topDict s ON s.dict_id = B.parent_dict_id " +
") SELECT * FROM topDict ")
List<TreeVo> queryDictTreeByPid(@Param("dictId")String dictId);
WITH RECURSIVE cNode AS (
SELECT A
.*
FROM
dlpt_dm.t20_measure_class_info A
WHERE
A.class_code = '10001'
UNION
SELECT
B.*
FROM
dlpt_dm.t20_measure_class_info B
INNER JOIN topOrg s ON s.class_code = B.parent_class_code
) SELECT
*
FROM
cNode where class_levels='3'