fixed: 菜单级联问题

This commit is contained in:
wangiegie@gmail.com 2017-11-09 09:03:18 +08:00
parent 2cec3dfbe2
commit 364b222acf
1 changed files with 3 additions and 1 deletions

View File

@ -79,17 +79,19 @@ public class MenuController {
*/
@DeleteMapping("/{id}")
public Boolean menuDel(@PathVariable Integer id) {
// 删除当前节点
SysMenu condition1 = new SysMenu();
condition1.setMenuId(id);
condition1.setDelFlag(CommonConstant.STATUS_DEL);
menuService.updateById(condition1);
// 删除父节点为当前节点的节点
SysMenu conditon2 = new SysMenu();
conditon2.setParentId(id);
SysMenu sysMenu = new SysMenu();
sysMenu.setDelFlag(CommonConstant.STATUS_DEL);
menuService.update(sysMenu,new EntityWrapper<>(conditon2));
return menuService.deleteById(id);
return Boolean.TRUE;
}
private List<MenuTree> getMenuTree(List<SysMenu> menus, int root) {