upper offset/limit from timi-spring
This commit is contained in:
@@ -30,4 +30,22 @@ public class BasePage {
|
||||
public void next() {
|
||||
index++;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取偏移量
|
||||
*
|
||||
* @return 偏移量
|
||||
*/
|
||||
public long getOffset() {
|
||||
return (long) index * size;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取限制数量
|
||||
*
|
||||
* @return 限制数量
|
||||
*/
|
||||
public long getLimit() {
|
||||
return size;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user