|
@@ -131,7 +131,7 @@ public class Pagination extends RowBounds implements Serializable {
|
|
|
}
|
|
|
|
|
|
public Pagination(int current, int size, boolean searchCount, boolean openSort) {
|
|
|
- super(offsetCurrent(current, size), size);
|
|
|
+ super(PageHelper.offsetCurrent(current, size), size);
|
|
|
if (current > 1) {
|
|
|
this.current = current;
|
|
|
}
|
|
@@ -140,17 +140,6 @@ public class Pagination extends RowBounds implements Serializable {
|
|
|
this.openSort = openSort;
|
|
|
}
|
|
|
|
|
|
- protected static int offsetCurrent(int current, int size) {
|
|
|
- if (current > 0) {
|
|
|
- return (current - 1) * size;
|
|
|
- }
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- public int offsetCurrent() {
|
|
|
- return offsetCurrent(this.current, this.size);
|
|
|
- }
|
|
|
-
|
|
|
public boolean hasPrevious() {
|
|
|
return this.current > 1;
|
|
|
}
|