mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 19:06:39 +08:00
转换为查询参数中添加是否查询总条数
This commit is contained in:
parent
36e554d8ed
commit
7d8879abcb
@ -12,7 +12,6 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页工具类
|
* 分页工具类
|
||||||
@ -32,6 +31,10 @@ public class SmartPageUtil {
|
|||||||
public static Page<?> convert2PageQuery(PageParam pageParam) {
|
public static Page<?> convert2PageQuery(PageParam pageParam) {
|
||||||
Page<?> page = new Page<>(pageParam.getPageNum(), pageParam.getPageSize());
|
Page<?> page = new Page<>(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
|
|
||||||
|
if (pageParam.getSearchCount() != null) {
|
||||||
|
page.setSearchCount(pageParam.getSearchCount());
|
||||||
|
}
|
||||||
|
|
||||||
List<PageParam.SortItem> sortItemList = pageParam.getSortItemList();
|
List<PageParam.SortItem> sortItemList = pageParam.getSortItemList();
|
||||||
if (CollectionUtils.isEmpty(sortItemList)) {
|
if (CollectionUtils.isEmpty(sortItemList)) {
|
||||||
return page;
|
return page;
|
||||||
|
Loading…
Reference in New Issue
Block a user