package com.liquidnet.service.adam.util;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageInfo;

/**
 * 枚举工具类
 *
 * @author LiChen
 * @date 2020/9/17 2:47 下午
 */
public class PageUtil {

    public static Page transferFromPageInfo(PageInfo pageInfo) {

        Page page = new Page();
        page.setRecords(pageInfo.getList());
        page.setTotal(pageInfo.getTotal());
        page.setSize(pageInfo.getPageSize());
        page.setCurrent(pageInfo.getPageNum());
        return page;
    }

}
