|
@@ -13,7 +13,12 @@ import lombok.Setter;
|
|
|
*/
|
|
|
@Setter
|
|
|
@Getter
|
|
|
-public class PageQuery<T> extends Page{
|
|
|
+public class PageQuery<T> {
|
|
|
+ /**
|
|
|
+ * 分页信息
|
|
|
+ */
|
|
|
+ private Page page;
|
|
|
+
|
|
|
/**
|
|
|
* 查询条件
|
|
|
*/
|
|
@@ -21,13 +26,17 @@ public class PageQuery<T> extends Page{
|
|
|
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
|
|
private T terms;
|
|
|
|
|
|
- /**
|
|
|
- * 返回分页对象
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Page getPage() {
|
|
|
- return new Page(this.getPageNo(), this.getPageSize(), this.getSortName(), this.getSortOrder(), this.getTotal(), this.getTotalPage());
|
|
|
+ public T getTerms(T t) {
|
|
|
+ if (terms == null) {
|
|
|
+ terms = t;
|
|
|
+ }
|
|
|
+ return terms;
|
|
|
}
|
|
|
|
|
|
+ public Page getPage() {
|
|
|
+ if (page == null) {
|
|
|
+ page = new Page(0, 10);
|
|
|
+ }
|
|
|
+ return this.page;
|
|
|
+ }
|
|
|
}
|