修复角色菜单临时接口
This commit is contained in:
@@ -13,7 +13,6 @@ import com.cool.store.utils.CommonNodeUtils;
|
||||
import com.cool.store.vo.menu.MenuAuthTreeVO;
|
||||
import com.cool.store.vo.menu.MenuTreeVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -68,14 +67,9 @@ public class MenuServiceImpl implements MenuService {
|
||||
|
||||
@Override
|
||||
public Long deleteMenuAuth(Long id) {
|
||||
List<SysMenuDO> sysMenuDOList = sysMenuDAO.selectMenuAll(null, PlatFormTypeEnum.PC.getCode());
|
||||
List<Long> idList = ListUtils.emptyIfNull(sysMenuDOList)
|
||||
.stream()
|
||||
.map(SysMenuDO::getId)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, List<Long>> parentGroupMap = ListUtils.emptyIfNull(sysMenuDOList)
|
||||
.stream()
|
||||
.collect(Collectors.groupingBy(SysMenuDO::getParentId, Collectors.mapping(SysMenuDO::getId, Collectors.toList())));
|
||||
List<SysMenuDO> menuList = sysMenuDAO.selectMenuAll(null, PlatFormTypeEnum.PC.getCode());
|
||||
List<Long> idList = menuList.stream().map(SysMenuDO::getId).collect(Collectors.toList());
|
||||
Map<Long, List<Long>> parentGroupMap = menuList.stream().collect(Collectors.groupingBy(SysMenuDO::getParentId, Collectors.mapping(SysMenuDO::getId, Collectors.toList())));
|
||||
List<Long> allChildList = CommonNodeUtils.getAllChildListContainSelf(0L,id, idList, parentGroupMap);
|
||||
sysMenuDAO.batchDeleteMenu(allChildList);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user