Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf701b18fa | ||
|
|
ebaeb1ac56 | ||
|
|
45124eba81 | ||
|
|
4cd0b2338d | ||
|
|
35fa531be9 | ||
|
|
b690656848 | ||
|
|
6e5f33f641 | ||
|
|
53b8c4c23f | ||
|
|
f8beb03362 | ||
|
|
f5528fbfad | ||
|
|
90c97f211b | ||
|
|
42dee2e4ad | ||
|
|
66eb6108cd | ||
|
|
82f950e71d | ||
|
|
cceabb0c8d | ||
|
|
62de8e4885 | ||
|
|
9f7460e959 | ||
|
|
90d4c5e5f6 |
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>com.imyeyu.spring</groupId>
|
||||
<artifactId>timi-spring</artifactId>
|
||||
<version>0.0.19</version>
|
||||
<version>0.0.18</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -37,6 +37,34 @@ public class Page<T> extends BasePage {
|
||||
/** 排序字段映射 */
|
||||
protected LinkedHashMap<String, BaseMapper.OrderType> orderMap;
|
||||
|
||||
/**
|
||||
* 创建分页参数
|
||||
*
|
||||
* @param index 页码
|
||||
* @param size 每页数量
|
||||
*/
|
||||
public Page(int index, int size) {
|
||||
super(index, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取偏移量
|
||||
*
|
||||
* @return 偏移量
|
||||
*/
|
||||
public long getOffset() {
|
||||
return (long) index * size;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取限制数量
|
||||
*
|
||||
* @return 限制数量
|
||||
*/
|
||||
public long getLimit() {
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加排序字段
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user