10,606
社区成员
发帖
与我相关
我的任务
分享
<select id="selectMenuList" parameterType="com.lw.model.system.MenuBean" resultType="com.lw.model.system.MenuBean">
SELECT A.MENU_ID,
DECODE (A.GRADE, 1, A.MENU_NAME, 2, '-' || A.MENU_NAME)
AS MENU_NAME,
A.MENU_URL,
A.MENU_DESC,
A.PARENT_ID,
A.MENU_IMAGE,
A.ORDER_NUM,
A.GRADE,
A.FLAG
FROM tb_menu A
START WITH A.parent_id = 0 AND A.FLAG = 0
CONNECT BY NOCYCLE PRIOR A.menu_id = A.parent_id AND A.FLAG = 0
ORDER SIBLINGS BY A.ORDER_NUM DESC
</select>
@RequestMapping(value = "/selectMenuList", method = RequestMethod.GET)
public ModelAndView showMenuList(HttpServletRequest request,MenuBean menuBean) {
ModelAndView mv = this.getModelAndView();
List<MenuBean> menuList = null;
try {
menuList = menuService.queryMenuList(menuBean);
} catch (Exception e) {
e.printStackTrace();
}
mv.addObject("menuList", menuList);
mv.addObject("menu", menuBean);
mv.setViewName("system/menu_list");
return mv;
}
<table
class="table table-border table-bordered table-bg table-hover table-sort">
<thead>
<tr class="text-c">
<th width="25"><!-- <input type="checkbox" name="" value=""> --></th>
<th width="200">菜单编号</th>
<th width="250">菜单名称</th>
<th width="300">菜单地址</th>
<th width="200">描述</th>
<th width="60">状态</th>
<th width="120">操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="${menuList}" varStatus="i" var="item">
<tr class="text-c">
<td><input type="checkbox" value="" name=""></td>
<td>${item.menuId}</td>
<td>${item.menuName}${i.index}</td>
<td>${item.menuUrl}</td>
<td>${item.menuDesc}</td>
<td class="td-status" align="center">
<c:if test="${item.flag eq '0'}">
<span class="label label-success radius">使用</span>
</c:if>
<c:if test="${item.flag eq '1'}">
<span class="label label-success radius">禁用</span>
</c:if>
</td>
<td class="f-14 td-manage">
<a style="text-decoration: none" class="ml-5" onClick="show_edit('编辑','./editMenuInit.do?menuId=${item.menuId}','10001')" href="javascript:;" title="编辑">
<i class="Hui-iconfont"></i>
</a>
<a style="text-decoration: none" class="ml-5" onClick="show_del(${item.menuId})" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a>
</td>
</tr>
</c:forEach>
</tbody>
</table>