feat(REQ-2186): 产品新增,政务支持多个端

This commit is contained in:
李昆鹏 2024-05-20 15:05:15 +08:00
parent 96ff23a4ce
commit 44ca72ed63
2 changed files with 5 additions and 5 deletions

View File

@ -142,7 +142,7 @@ public class ProductVO {
/**
* 功能范围(政务产品只取根节点的featureId后台取拉群所选根节点的所有子节点featureId)
*/
private FeatureScope featureScope;
private List<FeatureScope> featureScopes;
@Data
@Builder

View File

@ -359,10 +359,10 @@ public class ProductServiceImpl implements ProductService {
List<Long> featureIds = result.getData().stream().map(ProductFeatureRelationVO::getFeatureId).collect(Collectors.toList());
List<SaasFeatureResource> featureResources = saasFeatureResourceService.listByParentIdAndTerminalAndIds(0L, TerminalInfo.NT_PC_GA_GENERAL, featureIds);
if (CollectionUtil.isNotEmpty(featureResources)) {
product.setFeatureScope(ProductVO.FeatureScope.builder()
.governmentFeatureResourceId(featureResources.get(0).getId())
.featureResourceName(featureResources.get(0).getFeatureName())
.build());
product.setFeatureScopes(featureResources.stream().map(e -> ProductVO.FeatureScope.builder()
.governmentFeatureResourceId(e.getId())
.featureResourceName(e.getFeatureName())
.build()).collect(Collectors.toList()));
}
}