From d0c2333e0bbca5eb4e78237d8184e2ee482b3787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?qkr7828=28=EB=B0=95=EC=9E=AC=EC=9A=B0=29?= <박재우@DESKTOP-EF7ECBO> Date: Tue, 11 Oct 2022 14:35:35 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8A=B9=EC=9D=B8=EA=B4=80=EB=A6=AC=20-=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EC=9C=BC=EB=A1=9C=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=8B=9C=20=ED=8E=98=EC=9D=B4=EC=A7=95=EA=B3=BC=20=EC=A1=B0?= =?UTF-8?q?=EA=B1=B4=20=EC=B2=98=EB=A6=AC=EC=9D=98=20=EC=84=9C=EC=88=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/api/bas/group/service/BasGroupAprvService.java | 7 ++++--- .../jpa/repository/pty/PtyGroupQueryRepository.java | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) 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;