File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
quick-boot-base/quick-boot-core/src/main/java/com/quick/common/util Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ public class PageParam<T> implements Serializable {
33
33
@ Schema (description = "每页显示数量" )
34
34
private Long count ;
35
35
36
+ @ Schema (description = "每页显示数量(适配amis)" )
37
+ private Long perPage ;
38
+
36
39
@ Schema (description = "排序的字段" )
37
40
private String orderBy ;
38
41
@@ -46,7 +49,12 @@ public class PageParam<T> implements Serializable {
46
49
public <E > Page <E > buildPage (){
47
50
Page <E > page = new Page <>();
48
51
page .setCurrent (this .getPage ()==0 ?1 :this .getPage ());
49
- page .setSize (this .getCount ()==0 ?10 :this .getCount ());
52
+ if (this .getCount ()!=null ){
53
+ page .setSize (this .getCount ()==0 ?10 :this .getCount ());
54
+ }
55
+ if (this .getPerPage ()!=null ){
56
+ page .setSize (this .getPerPage ()==0 ?10 :this .getPerPage ());
57
+ }
50
58
List <OrderItem > orders = new ArrayList <>();
51
59
if (!StringUtils .isEmpty (this .orderBy )){
52
60
OrderItem orderItem = new OrderItem ();
You can’t perform that action at this time.
0 commit comments