| | |
| | | String typeStr = (String) map.get("type"); |
| | | List<String> typeList = null; |
| | | if (StringUtils.isNotEmpty(typeStr)) { |
| | | VisualCompType type = (VisualCompType) this.visualCompTypeService.getOne(Lambda.eq((v0) -> { |
| | | return v0.getType(); |
| | | }, typeStr)); |
| | | VisualCompType type = (VisualCompType) this.visualCompTypeService.getOne(Lambda.eq(VisualCompType::getType, typeStr)); |
| | | if (type.getParentId().longValue() == 0L) { |
| | | typeList = (List<String>)this.visualCompTypeService.list(Lambda.eq(VisualCompType::getParentId, type.getId()).select(VisualCompType::getType )) |
| | | .stream().map(VisualCompType::getType).collect(Collectors.toList()); |
| | |
| | | return convert; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualCompService |
| | | @Override |
| | | public void wrapper(List<VisualCompVO> voList) { |
| | | List<VisualCompType> typeList = this.visualCompTypeService.list(Lambda.ne((v0) -> { |
| | | return v0.getParentId(); |
| | | }, 0)); |
| | | List<VisualCompType> typeList = this.visualCompTypeService.list(Lambda.ne(VisualCompType::getParentId, 0)); |
| | | voList.parallelStream().forEach(item -> { |
| | | VisualCompType visualCompType = (VisualCompType) typeList.stream().filter(type -> { |
| | | VisualCompType visualCompType = typeList.stream().filter(type -> { |
| | | return item.getType().equals(type.getType()); |
| | | }).findFirst().orElse(null); |
| | | item.setTypeName((String) Optional.ofNullable(visualCompType).map((v0) -> { |
| | | item.setTypeName(Optional.ofNullable(visualCompType).map((v0) -> { |
| | | return v0.getName(); |
| | | }).orElse(null)); |
| | | }); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualCompService |
| | | @Override |
| | | public BladeFile componentZipDownload(List<Long> componentIds) { |
| | | |
| | | List<String> jsonTexts = list(Lambda.<VisualComp>in((componentIds != null && componentIds.size() != 0), VisualComp::getId, componentIds)) |