diff --git a/src/main/java/net/geedge/asw/module/app/controller/GitController.java b/src/main/java/net/geedge/asw/module/app/controller/GitController.java index 3fdd5b7..786a03b 100644 --- a/src/main/java/net/geedge/asw/module/app/controller/GitController.java +++ b/src/main/java/net/geedge/asw/module/app/controller/GitController.java @@ -64,12 +64,13 @@ public class GitController { @RequestParam(required = false) Integer current, @RequestParam(required = false) Integer size) { List> records = gitService.listBranchCommit(workspaceId, branchName, path); + long total = T.CollUtil.size(records); if (null != current && null != size) { int fromIndex = (current - 1) * size; int toIndex = Math.min(fromIndex + size, records.size()); records = records.subList(fromIndex, toIndex); } - return R.ok().putData("records", records); + return R.ok().putData("records", records).put("total", total); } @GetMapping({