<!--以下为菜单管理页面--><!-- ↓↓↓↓↓↓↓↓以下为页面 树形展示↓↓↓↓↓↓↓↓↓↓↓--><resultMapid="ParentTreeResultMap"type="com.lanou.entity.admin.Menu"><idcolumn="id"property="id"></id><resultcolumn="parentId"property="parentId"></result><resultcolumn="name"property="name"></result><resultcolumn="url"property="url"></result><resultcolumn="icon"property="icon"></result><collectioncolumn="id"property="children"ofType="com.lanou.entity.admin.Menu"select="listChild"></collection></resultMap><resultMapid="listChildResultMap"type="com.lanou.entity.admin.Menu"><idcolumn="id"property="id"></id><resultcolumn="parentId"property="parentId"></result><resultcolumn="name"property="name"></result><resultcolumn="url"property="url"></result><resultcolumn="icon"property="icon"></result><collectioncolumn="id"property="children"ofType="com.lanou.entity.admin.Menu"select="listChild"></collection></resultMap><!--子级节点查询(listChild) --><selectid="listChild"resultMap="listChildResultMap">
select id,parentId,name,url,icon from menu WHERE parentId=#{id};
</select><!-- 父级节点查询--><selectid="getMenuTree"resultMap="ParentTreeResultMap">
select id,parentId,name,url,icon from menu where parentId =0 ;
</select><!-- ↑↑↑↑↑↑↑以上为页面树形显示--><!-- 以下为页面模糊查询--><!--一级--><selectid="getLikeFirstMenuListOfThree"resultMap="ParentTreeResultMap"parameterType="com.lanou.entity.admin.Menu">
select id,parentId,name,url,icon from menu where parentId =0
<iftest="name !=null and name !=''">
AND name like concat('%',#{name},'%')
</if></select><!-- 二级--><selectid="getLikeSecondMenuListOfThree"resultMap="ParentTreeResultMap"parameterType="com.lanou.entity.admin.Menu">
select id,parentId,name,url,icon from menu where parentId =#{id}
</select><selectid="getLikeThirdMenuListOfThree"resultMap="ParentTreeResultMap"parameterType="com.lanou.entity.admin.Menu">
select id,parentId,name,url,icon from menu where parentId =#{id}
</select><!-- 以上为页面模糊查询--><!--以上为菜单管理页面-->