<!--级联查询返回模型--> <resultMap type="Map" id="fatherMap"> <id column="id" property="id"/> <collection property="list" ofType="com.jmxf.entity.zdbwManage.ZdbwIndoor" column="id" select="findMenuByPid"/> </resultMap> <!--级联查询父菜单--> <select id="selectAllMenu" resultMap="fatherMap" > select * from zdbw_indoor where fip = '0' </select> <!--级联查询子菜单--> <select id="findMenuByPid" resultMap="fatherMap" > select * from zdbw_indoor where fid = #{id} </select> <!--级联查询返回模型-->