diff --git a/src/main/java/com/palnet/biz/api/bas/group/service/BasGroupAprvService.java b/src/main/java/com/palnet/biz/api/bas/group/service/BasGroupAprvService.java index 33afeec..3f9db0b 100644 --- a/src/main/java/com/palnet/biz/api/bas/group/service/BasGroupAprvService.java +++ b/src/main/java/com/palnet/biz/api/bas/group/service/BasGroupAprvService.java @@ -11,6 +11,7 @@ import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import com.palnet.biz.api.anls.hstry.model.AnlsHstryModel; import com.palnet.biz.api.anls.hstry.model.AnlsHstryRsModel; import com.palnet.biz.api.bas.group.model.BasGroupAprvModel; import com.palnet.biz.api.bas.group.model.BasGroupAprvRqModel; @@ -46,13 +47,13 @@ public class BasGroupAprvService { Pageable pageable = PageRequest.of(rq.getPage()-1, rq.getRecord()); - PageImpl result = query.aprvList(rq, pageable); + List result = query.aprvList(rq); long total = query.aprvCount(rq); long totalPage = total % rq.getRecord() > 0 ? (total/rq.getRecord()) + 1 : total/rq.getRecord(); - - response.setItems(result.getContent()); + PageImpl resultList =new PageImpl(result, pageable, result.size()); + response.setItems(resultList.getContent()); response.setTotal(total); response.setPage(rq.getPage()); response.setTotalPage(totalPage); diff --git a/src/main/java/com/palnet/biz/jpa/repository/pty/PtyGroupQueryRepository.java b/src/main/java/com/palnet/biz/jpa/repository/pty/PtyGroupQueryRepository.java index b11d47e..ddc3fbe 100644 --- a/src/main/java/com/palnet/biz/jpa/repository/pty/PtyGroupQueryRepository.java +++ b/src/main/java/com/palnet/biz/jpa/repository/pty/PtyGroupQueryRepository.java @@ -263,7 +263,7 @@ public class PtyGroupQueryRepository{ } - public PageImpl aprvList(BasGroupAprvRqModel rq, Pageable pageable){ + public List aprvList(BasGroupAprvRqModel rq){ QPtyGroupBas bas = QPtyGroupBas.ptyGroupBas; QPtyCstmrGroup dtl = QPtyCstmrGroup.ptyCstmrGroup; QPtyCstmrBas cstmr = QPtyCstmrBas.ptyCstmrBas; @@ -333,8 +333,8 @@ public class PtyGroupQueryRepository{ // .where(dtl.groupAuthCd.ne("CREATER")) .where(dtl.groupAuthCd.ne("MASTER")) .orderBy(bas.createDt.desc()) - .offset(pageable.getOffset()) - .limit(pageable.getPageSize()) +// .offset(pageable.getOffset()) +// .limit(pageable.getPageSize()) .fetch(); List result = new ArrayList(); @@ -346,14 +346,14 @@ public class PtyGroupQueryRepository{ result.add(model); } } - return new PageImpl<>(result, pageable, result.size()); + return result; } for(BasGroupAprvModel model : queryResult) { model.setMemberName(EncryptUtils.decrypt(model.getMemberName())); result.add(model); } - return new PageImpl<>(result, pageable, result.size()); + return result; } public long aprvCount(BasGroupAprvRqModel rq){ QPtyGroupBas bas = QPtyGroupBas.ptyGroupBas;