class EruptApiPageModel extends EruptApiModel {

    public EruptApiPageModel(Status status, String message, Object data, PromptWay promptWay) {
        super(status, message, data, promptWay);
    }

    /**
     * 为分页查询返回结果
     * 必须是mybatis分页
     *
     * @param list
     * @param <T>
     * @return
     */
    public static <T> EruptApiModel successApi(List<T> list, int pageNum, int pageSize) {<FILL_FUNCTION_BODY>}
}

        PageInfo page = new PageInfo(list);//转化为pageInfo
        List<Map<String, Object>> mapList = list.stream().map(t -> {
            Map<String, Object> map = new HashMap<>();
            BeanMap beanMap = BeanMap.create(t);
            for (Object object : beanMap.entrySet()) {
                if (object instanceof Map.Entry) {
                    Map.Entry<String, Object> entry = (Map.Entry<String, Object>) object;
                    String key = entry.getKey();
                    map.put(key, beanMap.get(key));
                }
            }
            return map;
        }).collect(Collectors.toList());

        Page p = new Page();
        p.setList(mapList);
        p.setPageIndex(pageNum);
        p.setPageSize(pageSize);
        p.setTotal(page.getTotal());
        p.setTotalPage(page.getPages());//总页数

        return new EruptApiModel(Status.SUCCESS, null, p, PromptWay.MESSAGE);
    
<methods>public void <init>(xyz.erupt.core.view.EruptApiModel.Status, java.lang.String, java.lang.Object, xyz.erupt.core.view.EruptApiModel.PromptWay) ,public void <init>(xyz.erupt.core.view.EruptApiModel.Status, java.lang.String, xyz.erupt.core.view.EruptApiModel.PromptWay) ,public static xyz.erupt.core.view.EruptApiModel errorApi(java.lang.String) ,public static xyz.erupt.core.view.EruptApiModel errorApi(java.lang.Exception) ,public static xyz.erupt.core.view.EruptApiModel errorNoInterceptApi(java.lang.String) ,public static xyz.erupt.core.view.EruptApiModel errorNoInterceptMessage(java.lang.String) ,public static xyz.erupt.core.view.EruptApiModel successApi() ,public static xyz.erupt.core.view.EruptApiModel successApi(java.lang.String, java.lang.Object) ,public static xyz.erupt.core.view.EruptApiModel successApi(java.lang.Object) <variables>private java.lang.Object data,private boolean errorIntercept,private java.lang.String message,private xyz.erupt.core.view.EruptApiModel.PromptWay promptWay,private xyz.erupt.core.view.EruptApiModel.Status status