fix(权限点): 兼容path父级不存在

This commit is contained in:
zhansihu 2023-09-22 15:33:13 +08:00
parent 2542153b2c
commit d928f54d8b

View File

@ -286,7 +286,10 @@ public class PermissionPointServiceImpl implements PermissionPointService {
.collect(Collectors.toMap(SaasFeature::getId, Function.identity()));
//填充层级父级名称 直接父级信息
for (Long parentId : ids) {
pathName.add(parentsMapping.get(parentId).getFeatureName());
SaasFeature saasFeature = parentsMapping.get(parentId);
if (saasFeature != null) {
pathName.add(saasFeature.getFeatureName());
}
}
vo.setPathName(pathName);
SaasFeature parent = parentsMapping.get(vo.getParentId());