微调
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.func.Func1;
|
||||
import cn.hutool.core.lang.func.LambdaUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.njcn.msgpush.framework.common.pojo.PageParam;
|
||||
import com.njcn.msgpush.framework.common.pojo.SortablePageParam;
|
||||
import com.njcn.msgpush.framework.common.pojo.SortingField;
|
||||
@@ -64,4 +65,12 @@ public class PageUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static Integer getPageNum(PageParam pageParam) {
|
||||
return !ObjectUtil.isNull(pageParam.getPageNo()) && pageParam.getPageNo() != 0 ? pageParam.getPageNo() : 1;
|
||||
}
|
||||
|
||||
public static Integer getPageSize(PageParam pageParam) {
|
||||
return !ObjectUtil.isNull(pageParam.getPageSize()) && pageParam.getPageSize() != 0 ? pageParam.getPageSize() : 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user