在 navicat 工具中新建查询
SELECT
f.id AS id,
f.`name` AS `name`,
f.type AS type,
f.father_id AS fatherId,
c.id AS subId,
c.`name` AS subName,
c.type AS subType,
c.father_id AS subFatherId
FROM
category f
LEFT JOIN category c ON f.id = c.father_id
WHERE
f.father_id = 1