love.keeping.starter.web.utils.PageResultUtil Maven / Gradle / Ivy
The newest version!
package love.keeping.starter.web.utils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.pagehelper.PageInfo;
import love.keeping.starter.common.utils.BeanUtil;
import love.keeping.starter.common.utils.CollectionUtil;
import love.keeping.starter.common.utils.ObjectUtil;
import love.keeping.starter.web.resp.PageResult;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.NotNull;
import lombok.NonNull;
/**
* 分页数据Util
*
* @author Keeping
*/
public class PageResultUtil {
public static PageResult convert(@NonNull IPage page) {
return convert(page, null);
}
public static PageResult convert(@NonNull PageInfo pageInfo) {
return convert(pageInfo, null);
}
public static PageResult convert(@NotNull IPage page,
Map