diff --git a/src/main/java/kr/xit/fims/framework/support/mybatis/MybatisUtils.java b/src/main/java/kr/xit/fims/framework/support/mybatis/MybatisUtils.java index 05f7655d..50b0dbbb 100644 --- a/src/main/java/kr/xit/fims/framework/support/mybatis/MybatisUtils.java +++ b/src/main/java/kr/xit/fims/framework/support/mybatis/MybatisUtils.java @@ -14,8 +14,8 @@ public class MybatisUtils{ if(Checks.isEmpty(map)){ return new PageBounds(1, 10); } - int page = Checks.isEmpty(map.get("page")) || Integer.parseInt(String.valueOf(map.get("page"))) < 0? 1: Integer.parseInt(String.valueOf(map.get("page"))); - int limit = Checks.isEmpty(map.get("perPage")) || Integer.parseInt(String.valueOf(map.get("perPage"))) < 0? 20: Integer.parseInt(String.valueOf(map.get("perPage"))); + int page = Checks.isEmpty(map.get("pageNum")) || Integer.parseInt(String.valueOf(map.get("pageNum"))) < 0? 1: Integer.parseInt(String.valueOf(map.get("pageNum"))); + int limit = Checks.isEmpty(map.get("fetchSize")) || Integer.parseInt(String.valueOf(map.get("fetchSize"))) < 0? 20: Integer.parseInt(String.valueOf(map.get("fetchSize"))); // 정렬필드명.direction,정렬필드명.direction,... 형태(정렬필드,정렬필드.desc) String sort = Checks.isEmpty(map.get("sidx"))? "": String.valueOf(map.get("sidx")); return new PageBounds(page, limit , Order.formString(sort)); @@ -52,26 +52,10 @@ public class MybatisUtils{ public static RowBounds getPagingInfo(final int pageNum, final int limit){ return new PageBounds(pageNum, limit); } - - -// public static RowBounds getPagingInfo(PagableVo bean){ -// if(bean == null){ -// return new PageBounds(1, 10 , Order.formString("")); -// } -// int page = Checks.isEmpty(bean.getPage()) ? 1: Integer.parseInt(bean.getPage()); -// int limit = Checks.isEmpty(bean.getPerPage())? 20: Integer.parseInt(String.valueOf(bean.getPerPage())); -// String sort = Checks.isEmpty(bean.getSidx())? "": String.valueOf(bean.getSidx()); -// return new PageBounds(page, limit , Order.formString(sort)); -// } public static RowBounds getPagingInfo(int pageNum, int row, String sort){ return new PageBounds(pageNum, row, Order.formString(sort)); } - -// public static interface PagableVo { -// public String getPage(); -// public String getPerPage(); -// public String getSidx(); -// } + }