class ApiPageRes<M> extends ApiRes {

    /** 数据对象 **/
    @ApiModelProperty(value = "业务数据")
    private PageBean<M> data;


    /** 业务处理成功， 封装分页数据， 仅返回必要参数 **/
    public static <M> ApiPageRes<M> pages(IPage<M> iPage){<FILL_FUNCTION_BODY>}


    @Data
    @ApiModel
    public static class PageBean<M> {

        /** 数据列表 */
        @ApiModelProperty(value = "数据列表")
        private List<M> records;

        /** 总数量 */
        @ApiModelProperty(value = "总数量")
        private Long total;

        /** 当前页码 */
        @ApiModelProperty(value = "当前页码")
        private Long current;

        /** 是否包含下一页， true:包含 ，false: 不包含 */
        @ApiModelProperty(value = "是否包含下一页， true:包含 ，false: 不包含")
        private boolean hasNext;

    }

}


        PageBean<M> innerPage = new PageBean<>();
        innerPage.setRecords(iPage.getRecords());  //记录明细
        innerPage.setTotal(iPage.getTotal()); //总条数
        innerPage.setCurrent(iPage.getCurrent()); //当前页码
        innerPage.setHasNext( iPage.getPages() > iPage.getCurrent()); //是否有下一页

        ApiPageRes result = new ApiPageRes();
        result.setData(innerPage);
        result.setCode(ApiCodeEnum.SUCCESS.getCode());
        result.setMsg(ApiCodeEnum.SUCCESS.getMsg());

        return result;
    
<methods>public non-sealed void <init>() ,public static ApiRes#RAW customFail(java.lang.String) ,public static transient ApiRes#RAW fail(com.jeequan.jeepay.core.constants.ApiCodeEnum, java.lang.String[]) ,public static ApiRes#RAW ok() ,public static ApiRes<T> ok(T) ,public static ApiRes#RAW ok4newJson(java.lang.String, java.lang.Object) ,public static ApiRes#RAW okWithSign(java.lang.Object, java.lang.String) ,public static ApiRes<PageBean<T>> page(IPage<T>) ,public java.lang.String toJSONString() <variables>private java.lang.Integer code,private java.lang.Object data,private java.lang.String msg,private java.lang.String sign