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 c08fc93..545bc58 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 @@ -53,13 +53,13 @@ class MyBoardService( MyBoardV2Controller.Companion.Filter.OWNER -> { val data = this.boardJooqRepository.findAllByUserId(userId, page - 1, size) val totalCount = this.boardJooqRepository.selectTotalCountByUserId(userId) - return PageDto(data, totalCount, page, size) + return PageDto(data, totalCount, page, data.size) } MyBoardV2Controller.Companion.Filter.PARTICIPANT -> { val data = this.boardJooqRepository.findAllByParticipant(userId, page - 1, size) val totalCount = this.boardJooqRepository.selectTotalCountByParticipant(userId) - return PageDto(data, totalCount, page, size) + return PageDto(data, totalCount, page, data.size) } } } diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt index 7ec3a6c..f11702e 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt @@ -154,7 +154,7 @@ class BoardJooqRepositoryImpl( .where(jBoard.USER_ID.eq(userId).and(jBoard.YN.eq(1)).and(jBoard.ACTIVEYN.eq(1))) .orderBy(jBoard.CREATED_AT.desc()) .limit(size) - .offset(page) + .offset(page * size) .fetch() return data.map { diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index fa6ecc0..5935ced 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -1,7 +1,7 @@ spring: config: activate: - on-profile: dev + on-profile: local datasource: url: ENC(pz7EEQu20leZT3uKvGuyvt7YhmLSOJ03yp09o3HSmvk8QqSORYES8Y0iqtjYt3An0uSXVGvd+PdNxXF4h1KXbLm6aMSl2K9gWh2XR5GbIpPAKasqkuha20MGAVckb9NRQC3s0IowzCMvt+jOv0Z1RrAnsfzJy08ZbWe41Slcz/VaQU1hSF6HVohMUrBPApDELlW558sM0jWPfi7NPYNGSlyB4f3bYa0WqjOIAAKPVb3ptvrQwmN7Wg==) username: ENC(6B0VWBlhLIFr2ynq8c8jug==) @@ -42,4 +42,4 @@ logging: webhook-uri: ENC(yfeX3WHXQdxkVtasNl5WLv6M/YlN+dVFUurjxGIddstjjipt+KryWKvLu1wDmdGjpuEhUHyaABg4gFWRMk9gNlxSQEE/G1twbuvkOvT0pyFWycVVJ6ryU/v9pDBOS1PSKJY7L3NP66gOGnam6nOvf0Y+F45zZvXj8/sdtR6N798U6fGjFDxOLQ==) level: - root: ERROR + root: INFO