diff --git a/src/main/java/com/meetup/teame/backend/domain/activity/service/ActivityService.java b/src/main/java/com/meetup/teame/backend/domain/activity/service/ActivityService.java index 264d801..e31f685 100644 --- a/src/main/java/com/meetup/teame/backend/domain/activity/service/ActivityService.java +++ b/src/main/java/com/meetup/teame/backend/domain/activity/service/ActivityService.java @@ -66,7 +66,7 @@ public ReadActivitiesRes findActivities(ReadActivitiesReq activitiesReq) { .map(Personality::of) .collect(Collectors.toList()); - long pageCount = activityRepository.countActivities(agencyTypes, personalities) / ACTIVITY_PAGE_SIZE + 1; // 전체 페이지 수 계산 + long pageCount = (activityRepository.countActivities(agencyTypes, personalities) + ACTIVITY_PAGE_SIZE - 1) / ACTIVITY_PAGE_SIZE; // 전체 페이지 수 계산 List likedActivityIds = activityLikeRepository.findLikedActivityIdsByUserId(userId); Set likedActivityIdsSet = new HashSet<>(likedActivityIds); @@ -100,7 +100,7 @@ public ReadActivitiesRes findlikedActivities(ReadActivitiesReq activitiesReq) { List likedActivityIds = activityLikeRepository.findLikedActivityIdsByUserId(userId); Set likedActivityIdsSet = new HashSet<>(likedActivityIds); - long pageCount = likedActivityIds.size() / ACTIVITY_PAGE_SIZE + 1; + long pageCount = (likedActivityIds.size() + ACTIVITY_PAGE_SIZE - 1) / ACTIVITY_PAGE_SIZE; List activities = activityRepository.findLikedActivities(userId, offset, limit, agencyTypes, personalities); List activitySummaries = activities.stream() diff --git a/src/main/java/com/meetup/teame/backend/domain/register/service/RegisterService.java b/src/main/java/com/meetup/teame/backend/domain/register/service/RegisterService.java index decbacf..67a8b94 100644 --- a/src/main/java/com/meetup/teame/backend/domain/register/service/RegisterService.java +++ b/src/main/java/com/meetup/teame/backend/domain/register/service/RegisterService.java @@ -19,7 +19,6 @@ public class RegisterService { /** * 회원가입 * client에게 RegisterRequest(name,email,password,location)를 입력 받아 비밀번호 암호화 후 저장 - * email, userName 중복체크는 안 할 예정 */ public Long register(RegisterRequest request) { String encodedPassword = encoder.encode(request.getPassword()); diff --git a/src/main/java/com/meetup/teame/backend/domain/review/controller/ReviewController.java b/src/main/java/com/meetup/teame/backend/domain/review/controller/ReviewController.java index 6a9922e..2728778 100644 --- a/src/main/java/com/meetup/teame/backend/domain/review/controller/ReviewController.java +++ b/src/main/java/com/meetup/teame/backend/domain/review/controller/ReviewController.java @@ -47,16 +47,4 @@ public ResponseEntity readReviewsByMe() { return ResponseEntity .ok(reviewService.readReviewsByMe()); } - - -// @Operation(summary = "나의 후기 보기", description = """ -// 나의 후기 보기 api 입니다. -// """) -// @GetMapping("/aboutme") -// public ResponseEntity readReviewsAboutMe() { -// //todo api 작성 -// return null; -//// return ResponseEntity -//// .ok(reviewService.readReviewsAboutMe()); -// } }