From 589cf5edd350caeec437df423e7179d40ada7c52 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: Wed, 12 Oct 2022 10:20:58 +0900 Subject: [PATCH] Revert "." This reverts commit 3524d26620caf777b3c6690f5c755ad134722f0b. --- .../bas/group/service/BasGroupAprvService.java | 17 +++++++++-------- 1 file 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 1a0d725..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 @@ -1,6 +1,5 @@ package com.palnet.biz.api.bas.group.service; -import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -12,6 +11,8 @@ 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; import com.palnet.biz.api.comn.model.ComnPagingRs; @@ -42,7 +43,8 @@ public class BasGroupAprvService { public ComnPagingRs mylist(BasGroupAprvRqModel rq){ ComnPagingRs response = new ComnPagingRs<>(); - + + Pageable pageable = PageRequest.of(rq.getPage()-1, rq.getRecord()); List result = query.aprvList(rq); @@ -50,14 +52,13 @@ public class BasGroupAprvService { long total = query.aprvCount(rq); long totalPage = total % rq.getRecord() > 0 ? (total/rq.getRecord()) + 1 : total/rq.getRecord(); - -// response.setItems(result.getContent()); -// response.setTotal(total); -// response.setPage(rq.getPage()); -// response.setTotalPage(totalPage); + PageImpl resultList =new PageImpl(result, pageable, result.size()); + response.setItems(resultList.getContent()); + response.setTotal(total); + response.setPage(rq.getPage()); + response.setTotalPage(totalPage); return response; - }