@ -228,7 +228,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
}
if (menu.getParentId() != null && menu.getId() == null) {
Menu parentMenu = baseMapper.selectById(menu.getParentId());
if (parentMenu.getCategory() != 1) {
if (parentMenu != null && parentMenu.getCategory() != 1) {
throw new ServiceException("父节点只可选择菜单类型!");