|
@@ -2,7 +2,6 @@ package com.ym.mec.common.page;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
-import com.ym.mec.common.tenant.TenantContextHolder;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
@@ -47,20 +46,6 @@ public class PageUtil {
|
|
return resultPage;
|
|
return resultPage;
|
|
}
|
|
}
|
|
|
|
|
|
- public static <T> PageInfo<T> pageInfo(com.microsvc.toolkit.common.response.paging.PageInfo<T> source) {
|
|
|
|
- if (Objects.isNull(source)) {
|
|
|
|
- return new PageInfo<>(1, 20);
|
|
|
|
- }
|
|
|
|
- int total = Integer.parseInt(String.valueOf(source.getTotal()));
|
|
|
|
- int limit = Integer.parseInt(String.valueOf(source.getLimit()));
|
|
|
|
- PageInfo<T> resultPage = new PageInfo<>();
|
|
|
|
- resultPage.setRows(source.getRows());
|
|
|
|
- resultPage.setPageNo(Long.valueOf(source.getCurrent()).intValue());
|
|
|
|
- resultPage.setLimit(limit);
|
|
|
|
- resultPage.setTotal(total);
|
|
|
|
- return resultPage;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 分页有需要拼接时分秒要求的可以使用这个方法
|
|
* 分页有需要拼接时分秒要求的可以使用这个方法
|
|
*/
|
|
*/
|