mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 10:56: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.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 分页工具类
|
||||
@ -32,6 +31,10 @@ public class SmartPageUtil {
|
||||
public static Page<?> convert2PageQuery(PageParam pageParam) {
|
||||
Page<?> page = new Page<>(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
|
||||
if (pageParam.getSearchCount() != null) {
|
||||
page.setSearchCount(pageParam.getSearchCount());
|
||||
}
|
||||
|
||||
List<PageParam.SortItem> sortItemList = pageParam.getSortItemList();
|
||||
if (CollectionUtils.isEmpty(sortItemList)) {
|
||||
return page;
|
||||
|
Loading…
Reference in New Issue
Block a user