fix: 修复菜单修改问题
This commit is contained in:
@@ -190,8 +190,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||
public void update(SysMenu resources) {
|
||||
String menuId = resources.getMenu_id();
|
||||
SysMenu menu = baseMapper.selectById(menuId);
|
||||
List<String> allChildIds = Arrays.asList(baseMapper.findAllChild(menuId).split(","));
|
||||
if (allChildIds.contains(resources.getPid())){
|
||||
String allChild = baseMapper.findAllChild(menuId); // 获取当前菜单的所有子菜单
|
||||
List<String> allChildIds = ObjectUtil.isNotEmpty(allChild)?Arrays.asList(allChild.split(",")):null;
|
||||
if (ObjectUtil.isNotEmpty(allChildIds) && allChildIds.contains(resources.getPid())){
|
||||
throw new BadRequestException("上级不能为自己或自己的下级");
|
||||
}
|
||||
if (resources.getIframe()) {
|
||||
|
||||
Reference in New Issue
Block a user