Skip to content

Commit 267f667

Browse files
committed
fix: App v1 service
1 parent 3c66527 commit 267f667

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

base/src/main/java/com/tinyengine/it/service/app/impl/v1/AppV1ServiceImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,11 @@ public List<Map<String, Object>> getSchemaComponentsMap(MetaDto metaDto) {
507507
// 合并两个 List
508508
List<Map<String, Object>> componentsMap = new ArrayList<>(componentsSchema);
509509
componentsMap.addAll(blocksSchema);
510-
return componentsMap;
510+
// 使用 Stream API 去重
511+
List<Map<String, Object>> uniqueComponents = componentsMap.stream()
512+
.distinct()
513+
.collect(Collectors.toList());
514+
return uniqueComponents;
511515
}
512516

513517
// 将区块组装成schema数据

base/src/main/java/com/tinyengine/it/service/material/impl/ComponentServiceImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public Result<FileResult> readFileAndBulkCreate(MultipartFile file) {
148148
for (ComponentLibrary componentLibrary : packageList) {
149149
componentLibrary.setIsDefault(true);
150150
componentLibrary.setIsStarted(true);
151+
componentLibrary.setIsOfficial(true);
151152
ComponentLibrary library = new ComponentLibrary();
152153
library.setName(componentLibrary.getName());
153154
library.setVersion(componentLibrary.getVersion());

base/src/main/resources/mappers/ComponentLibraryMapper.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@
273273
C.site_id AS componentSiteId
274274
FROM t_component_library CL
275275
LEFT JOIN t_component C ON CL.id = C.library_id
276-
WHERE CL.is_default = false
277276

278277
</select>
279278

0 commit comments

Comments
 (0)