Index: web-module/pom.xml =================================================================== diff -u -r0cf45c181be03a7254ba758f857d8c7db0fe1647 -rb8269bb63f38bf3c3105fce851b707da38fb703f --- web-module/pom.xml (.../pom.xml) (revision 0cf45c181be03a7254ba758f857d8c7db0fe1647) +++ web-module/pom.xml (.../pom.xml) (revision b8269bb63f38bf3c3105fce851b707da38fb703f) @@ -17,7 +17,7 @@ Web Project by 313 DEV GRP - 23.01.22 + 23.01.25 Index: web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java =================================================================== diff -u -r0cf45c181be03a7254ba758f857d8c7db0fe1647 -rb8269bb63f38bf3c3105fce851b707da38fb703f --- web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java (.../UserReqReviewController.java) (revision 0cf45c181be03a7254ba758f857d8c7db0fe1647) +++ web-module/src/main/java/egovframework/api/arms/module_reqreview/controller/UserReqReviewController.java (.../UserReqReviewController.java) (revision b8269bb63f38bf3c3105fce851b707da38fb703f) @@ -75,11 +75,24 @@ * totalRecordCount : 전체 게시물 건 수. */ + ReqReviewDTO reqReviewDTO = new ReqReviewDTO(); + int recordCountPerPage = parser.getInt("length"); + int start = parser.getInt("start"); + int currentPageNo = Math.floorDiv(start,recordCountPerPage) + 1; + reqReviewDTO.setPageIndex(currentPageNo); + reqReviewDTO.setPageUnit(recordCountPerPage); + + String searchStr = parser.get("search[value]"); + if( StringUtility.isNotEmpty(searchStr) ){ + + Criterion filter_criterion = Restrictions.like("c_review_req_name", "%" + searchStr +"%"); + reqReviewDTO.getCriterions().add(filter_criterion); + } + String searchReviewer = parser.get("reviewer"); - ReqReviewDTO reqReviewDTO = new ReqReviewDTO(); Criterion criterion = Restrictions.not( // replace "id" below with property name, depending on what you're filtering against Restrictions.in("c_id", new Object[] {1L, 2L}) @@ -117,10 +130,18 @@ reqReviewDTO.setOrder(Order.desc("c_review_creat_date")); - List list = reqReview.getChildNode(reqReviewDTO); + List list = reqReview.getPaginatedChildNode(reqReviewDTO); ModelAndView modelAndView = new ModelAndView("jsonView"); HashMap resultMap = Maps.newHashMap(); +// "draw": 1, +// "recordsTotal": 57, +// "recordsFiltered": 57, + resultMap.put("draw", parser.getInt("draw")); + resultMap.put("recordsTotal", list.get(0).getPaginationInfo().getTotalRecordCount()); + resultMap.put("recordsFiltered", list.get(0).getPaginationInfo().getTotalRecordCount()); + resultMap.put("pagesize", list.get(0).getPaginationInfo().getPageSize()); + resultMap.put("paginationInfo", list.get(0).getPaginationInfo()); resultMap.put("result", list); modelAndView.addObject("result", resultMap);