From 258a769f6790f832d1c67839d59be04a118767e5 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 28 四月 2024 10:50:48 +0800
Subject: [PATCH] 用时分析代码整理+注释整理
---
smart-man-boot/src/main/java/com/qianwen/smartman/modules/visual/service/impl/VisualCompServiceImpl.java | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/visual/service/impl/VisualCompServiceImpl.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/visual/service/impl/VisualCompServiceImpl.java
index 324c851..f3effca 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/visual/service/impl/VisualCompServiceImpl.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/visual/service/impl/VisualCompServiceImpl.java
@@ -57,9 +57,7 @@
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());
@@ -89,22 +87,20 @@
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))
--
Gitblit v1.9.3