优化上级菜单不能选择自己

2.X
RuoYi 5 years ago committed by 疯狂的狮子li
parent ffd637ae37
commit 7ef0848544

@ -124,6 +124,10 @@ public class SysMenuController extends BaseController
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败地址必须以http(s)://开头");
}
else if (menu.getMenuId().equals(menu.getParentId()))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
}
menu.setUpdateBy(SecurityUtils.getUsername());
return toAjax(menuService.updateMenu(menu));
}

Loading…
Cancel
Save