feat:(HOTFIX) 处理项目没有服务包对应的产品的情况
This commit is contained in:
parent
2c90e32499
commit
efbb4dd26f
@ -240,9 +240,11 @@ public class WorkspaceProductServiceImpl implements WorkspaceProductService {
|
||||
List<WorkspaceProductDTO> workspaceProductDTOS = Lists.newArrayList();
|
||||
|
||||
servicePkgDetailRes.forEach(e -> {
|
||||
Set<Long> workpsaceProductIds = e.getProducts().stream()
|
||||
.map(ServicePkgProduct::getProductId)
|
||||
.collect(Collectors.toSet());
|
||||
Set<Long> workpsaceProductIds = Optional.ofNullable(e.getProducts())
|
||||
.map(products -> products.stream()
|
||||
.map(ServicePkgProduct::getProductId)
|
||||
.collect(Collectors.toSet()))
|
||||
.orElse(null);
|
||||
if (CollectionUtils.isEmpty(workpsaceProductIds)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user