Merge branch 'master' of https://gitee.com/stackcn/youlai-boot
This commit is contained in:
@@ -241,7 +241,9 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
|
|||||||
|
|
||||||
menuForm.setComponent(null);
|
menuForm.setComponent(null);
|
||||||
}
|
}
|
||||||
|
if (Objects.equals(menuForm.getParentId(), menuForm.getId())){
|
||||||
|
throw new RuntimeException("父级菜单不能为当前菜单");
|
||||||
|
}
|
||||||
Menu entity = menuConverter.toEntity(menuForm);
|
Menu entity = menuConverter.toEntity(menuForm);
|
||||||
String treePath = generateMenuTreePath(menuForm.getParentId());
|
String treePath = generateMenuTreePath(menuForm.getParentId());
|
||||||
entity.setTreePath(treePath);
|
entity.setTreePath(treePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user