feat(REQ-2545): 查询页面元素接口修改

This commit is contained in:
李昆鹏 2024-07-08 17:42:30 +08:00
parent 686c638dd5
commit 75230ec40a

View File

@ -104,9 +104,11 @@ public class SaasPageElementServiceImpl implements SaasPageElementService {
// 如果查询不仅仅是已勾选的需要把已勾选的页面下未选择的组件也返回
if (!Boolean.TRUE.equals(request.getQuerySelectedOnly())) {
List<String> pageTypeCodes = selectedPageElements.stream().filter(e -> PageElementTypeEnum.PAGE.getCode().equals(e.getType())).map(SaasPageElement::getGroupCode).collect(Collectors.toList());
List<SaasPageElement> notSelectedComponents = saasPageElementDao.listByGroupCodesAndExcludeIds(pageTypeCodes, selectedIds, saasFeatureResource.getTerminal(), null);
if (CollectionUtils.isNotEmpty(notSelectedComponents)) {
selectedPageElements.addAll(notSelectedComponents);
if (CollectionUtils.isNotEmpty(pageTypeCodes)) {
List<SaasPageElement> notSelectedComponents = saasPageElementDao.listByGroupCodesAndExcludeIds(pageTypeCodes, selectedIds, saasFeatureResource.getTerminal(), null);
if (CollectionUtils.isNotEmpty(notSelectedComponents)) {
selectedPageElements.addAll(notSelectedComponents);
}
}
}
return change2PageElementResp(selectedPageElements, selectedIds);