diff --git a/src/main/java/net/geedge/asw/module/app/service/impl/ApplicationServiceImpl.java b/src/main/java/net/geedge/asw/module/app/service/impl/ApplicationServiceImpl.java index 42495ad..8eb8068 100644 --- a/src/main/java/net/geedge/asw/module/app/service/impl/ApplicationServiceImpl.java +++ b/src/main/java/net/geedge/asw/module/app/service/impl/ApplicationServiceImpl.java @@ -163,7 +163,7 @@ public class ApplicationServiceImpl implements IApplicationService { } // 新增APP for (ApplicationEntity entity : addAppList) { - for (String fileName : T.ListUtil.of("README.md", "meta.json", "signature.json", "icon.png")) { + for (String fileName : T.ListUtil.of("README.md", "meta.json", "signature.json")) { String fileContent = T.StrUtil.EMPTY; if ("meta.json".equals(fileName)) { JSONObject tempJSONObject = T.JSONUtil.parseObj(entity); diff --git a/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java b/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java index 3a14315..12d604c 100644 --- a/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java +++ b/src/main/java/net/geedge/asw/module/app/service/impl/GitServiceImpl.java @@ -592,9 +592,7 @@ public class GitServiceImpl implements IGitService { treeWalk.setFilter(PathFilter.create("applications/")); treeWalk.setRecursive(true); - Map appIconDataMapping = T.MapUtil.newHashMap(); Map appDirPathMapping = T.MapUtil.newHashMap(true); - while (treeWalk.next()) { String filePath = treeWalk.getPathString(); String fileName = treeWalk.getNameString(); @@ -624,13 +622,6 @@ public class GitServiceImpl implements IGitService { appDirPathMapping.put(applicationName, appDirPath); resultList.add(m); - } else if (T.StrUtil.equals("icon.png", fileName)) { - ObjectLoader loader = repository.open(treeWalk.getObjectId(0)); - byte[] bytes = loader.getBytes(); - if (T.ObjectUtil.isNotEmpty(bytes)) { - String dirPath = treeWalk.getPathString().replaceAll(fileName, ""); - appIconDataMapping.put(dirPath, Base64.getEncoder().encodeToString(bytes)); - } } } @@ -638,13 +629,6 @@ public class GitServiceImpl implements IGitService { for (Map map : resultList) { String applicationName = T.MapUtil.getStr(map, "name"); - if (T.StrUtil.isNotEmpty(applicationName)) { - String iconBase64Str = appIconDataMapping.get(T.StrUtil.concat(true, "applications/", applicationName, "/")); - if (T.StrUtil.isNotEmpty(iconBase64Str)) { - map.put("icon", "data:image/png;base64," + iconBase64Str); - } - } - RevCommit lastCommit = T.MapUtil.get(lastCommitMapping, applicationName, RevCommit.class); map.put("commit", this.buildAswCommitInfo(lastCommit)); } @@ -718,7 +702,7 @@ public class GitServiceImpl implements IGitService { Repository repository = git.getRepository(); Map filePathAndBlobIdMap = T.MapUtil.newHashMap(true); - for (String str : T.ListUtil.of("README.md", "meta.json", "signature.json", "icon.png")) { + for (String str : T.ListUtil.of("README.md", "meta.json", "signature.json")) { String savePath = T.StrUtil.concat(true, "applications/", applicationName, "/", str); String fileContent = T.StrUtil.EMPTY;