fix: 解决 meta.json 解析错误导致无法查看 application lastCommit 问题

This commit is contained in:
shizhendong
2024-11-13 18:09:25 +08:00
parent beb8ccdce6
commit fe55a7fcf8

View File

@@ -594,9 +594,8 @@ public class GitServiceImpl implements IGitService {
m.putAll(metaJsonMap);
m.put("name", applicationName);
String appId = T.MapUtil.getStr(metaJsonMap, "id", "");
String appDirPath = treeWalk.getPathString().replaceAll(fileName, "");
appDirPathMapping.put(appId, appDirPath);
appDirPathMapping.put(applicationName, appDirPath);
resultList.add(m);
} else if (T.StrUtil.equals("icon.png", fileName)) {
@@ -620,8 +619,7 @@ public class GitServiceImpl implements IGitService {
}
}
String appId = T.MapUtil.getStr(map, "id");
RevCommit lastCommit = T.MapUtil.get(lastCommitMapping, appId, RevCommit.class);
RevCommit lastCommit = T.MapUtil.get(lastCommitMapping, applicationName, RevCommit.class);
map.put("commit", this.buildAswCommitInfo(lastCommit));
}
}