-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPageVo.java
More file actions
46 lines (34 loc) · 897 Bytes
/
Copy pathPageVo.java
File metadata and controls
46 lines (34 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package mybatis.interceptor;
public class PageVo {
/*
这个类,对应的是easyui中datagrid分页所传入的参数
*/
protected int page = 1;//当前页数,默认为1
protected int rows = 15;//每页显示条数,默认为15
private int offset = 0;//每页起始条数
private int limit = 15;//每页结束条数
public int getLimit() {
return (page - 1) * rows;
}
public void setLimit(int limit) {
this.limit = limit;
}
public int getOffset() {
return page * rows;
}
public void setOffset(int offset) {
this.offset = (page - 1) * rows;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getRows() {
return rows;
}
public void setRows(int rows) {
this.rows = rows;
}
}