fix: application 列表页面按照 commit.createdAt 倒叙排序
This commit is contained in:
@@ -574,6 +574,12 @@ public class GitServiceImpl implements IGitService {
|
||||
map.put("commit", this.buildAswCommitInfo(lastCommit));
|
||||
}
|
||||
}
|
||||
|
||||
// 按照提交日期倒叙
|
||||
resultList = resultList.stream().sorted(Comparator.comparing(map -> {
|
||||
Map commit = T.MapUtil.get((Map) map, "commit", Map.class, new HashMap(2));
|
||||
return (Long) T.MapUtil.getLong(commit, "createdAt", 0l);
|
||||
}).reversed()).collect(Collectors.toList());
|
||||
} catch (IOException e) {
|
||||
log.error(e, "[listApplication] [error] [workspaceId: {}] [branch: {}]", workspaceId, branch);
|
||||
throw new ASWException(RCode.ERROR);
|
||||
|
||||
Reference in New Issue
Block a user