diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/result/PageResult.java b/youlai-common/common-core/src/main/java/com/youlai/common/result/PageResult.java index 278f2843b..c853accf5 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/result/PageResult.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/result/PageResult.java @@ -17,18 +17,30 @@ public class PageResult implements Serializable { private String code; - private List data; - - private long total; + private Data data; private String msg; public static PageResult success(IPage page) { PageResult result = new PageResult<>(); result.setCode(ResultCode.SUCCESS.getCode()); - result.setData(page.getRecords()); - result.setTotal(page.getTotal()); + + Data data = new Data(); + data.setList(page.getRecords()); + data.setTotal(page.getTotal()); + + result.setData(data); result.setMsg(ResultCode.SUCCESS.getMsg()); return result; } + + @lombok.Data + public static class Data { + + private List list; + + private long total; + + } + }