1
This commit is contained in:
@@ -29,6 +29,11 @@ public class SearchParam {
|
||||
private String sortField;
|
||||
private String sortOrder = "DESC";
|
||||
|
||||
/** MyBatis XML에서 #{offset} 참조 시 사용되는 계산값 */
|
||||
public int getOffset() {
|
||||
return Math.max(0, pageNum - 1) * pageSize;
|
||||
}
|
||||
|
||||
/** PageHelper 시작 호출. Service 첫 줄에서 호출한다. */
|
||||
public void startPage() {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
|
||||
Reference in New Issue
Block a user