From 364b222acfcfe9015921cc0d567bc7a088cc19d0 Mon Sep 17 00:00:00 2001 From: "wangiegie@gmail.com" Date: Thu, 9 Nov 2017 09:03:18 +0800 Subject: [PATCH] =?UTF-8?q?fixed=EF=BC=9A=20=E8=8F=9C=E5=8D=95=E7=BA=A7?= =?UTF-8?q?=E8=81=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/github/pig/admin/controller/MenuController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pig-admin-service/src/main/java/com/github/pig/admin/controller/MenuController.java b/pig-admin-service/src/main/java/com/github/pig/admin/controller/MenuController.java index 25e66380..e6e18d2d 100644 --- a/pig-admin-service/src/main/java/com/github/pig/admin/controller/MenuController.java +++ b/pig-admin-service/src/main/java/com/github/pig/admin/controller/MenuController.java @@ -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 getMenuTree(List menus, int root) {