Skip to content

Commit 1b1f802

Browse files
committed
fix PageRequest
1 parent 800ff33 commit 1b1f802

File tree

1 file changed

+4
-4
lines changed
  • springboot-starter/src/main/java/com/codingapi/springboot/framework/dto/request

1 file changed

+4
-4
lines changed

springboot-starter/src/main/java/com/codingapi/springboot/framework/dto/request/PageRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class PageRequest extends org.springframework.data.domain.PageRequest {
2424
private org.springframework.data.domain.PageRequest pageRequest;
2525

2626
public PageRequest(int current, int pageSize, Sort sort) {
27-
super(current > 0 ? current-- : 0, pageSize, sort);
27+
super(current, pageSize, sort);
2828
this.current = current;
2929
this.pageSize = pageSize;
3030
this.pageRequest = org.springframework.data.domain.PageRequest.of(current, pageSize, sort);
@@ -99,17 +99,17 @@ public Sort getSort() {
9999
}
100100

101101
@Override
102-
public org.springframework.data.domain.PageRequest next() {
102+
public PageRequest next() {
103103
return new PageRequest(current + 1, getPageSize(), getSort());
104104
}
105105

106106
@Override
107-
public org.springframework.data.domain.PageRequest previous() {
107+
public PageRequest previous() {
108108
return current == 0 ? this : new PageRequest(current - 1, getPageSize(), getSort());
109109
}
110110

111111
@Override
112-
public org.springframework.data.domain.PageRequest first() {
112+
public PageRequest first() {
113113
return new PageRequest(0, getPageSize(), getSort());
114114
}
115115

0 commit comments

Comments
 (0)