From d4e44d062471d42cbd45389aeee98badc3b52cee Mon Sep 17 00:00:00 2001 From: dldmsql Date: Sat, 17 Aug 2024 00:10:50 +0900 Subject: [PATCH] =?UTF-8?q?fix(POLABO-108):=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EC=85=98=20=EC=A0=95=EC=B1=85=20=ED=86=B5?= =?UTF-8?q?=EC=9D=BC=ED=99=94=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/board/my/controller/MyBoardController.kt | 2 +- .../ddd/sonnypolabobe/domain/board/my/service/MyBoardService.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/controller/MyBoardController.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/controller/MyBoardController.kt index 2a5150d..10522e3 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/controller/MyBoardController.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/controller/MyBoardController.kt @@ -22,7 +22,7 @@ class MyBoardController(private val myBoardService : MyBoardService) { @RequestParam size : Int ) : ApplicationResponse> { val user = SecurityContextHolder.getContext().authentication.principal as UserDto.Companion.Res - return ApplicationResponse.ok(this.myBoardService.getMyBoards(user.id, page-1, size)) + return ApplicationResponse.ok(this.myBoardService.getMyBoards(user.id, page, size)) } diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/service/MyBoardService.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/service/MyBoardService.kt index 9f2dfde..aa2a357 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/service/MyBoardService.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/my/service/MyBoardService.kt @@ -27,7 +27,7 @@ class MyBoardService(private val boardJooqRepository: BoardJooqRepository) { } fun getMyBoards(userId: Long, page: Int, size: Int): PageDto { - val data = this.boardJooqRepository.findAllByUserId(userId, page, size) + val data = this.boardJooqRepository.findAllByUserId(userId, page-1, size) val totalCount = this.boardJooqRepository.selectTotalCountByUserId(userId) val totalPage = totalCount.toInt() / size + 1