Skip to content

Conversation

@jeeehdev
Copy link
Contributor

@jeeehdev jeeehdev commented Nov 19, 2024

Pull requests

작업한 내용

  • 코치 리스트를 조회할 때 성별 필터를 추가함
    • 사용자가 제공한 성별에 맞는 코치들만 조회되도록 Usergender 속성에 맞는 필터링 로직을 구현했습니다.
    • 성별 필터는 CoachService에서 User 객체의 성별을 받아서 해당 성별에 맞는 코치들만 조회하도록 수정되었습니다.
  • 기타 Response 값 수정(프론트 요청)
    • 인기 코치 리스트 조회 API에 평점 컬럼 추가
    • 코치 디테일 조회 API에 리뷰수 추가
  • v22 파일 수정

PR Point

  • 사용자가 제공한 성별에 따라 코치 목록을 필터링하여, 성별을 기반으로 한 맞춤형 코치 리스트를 제공.
  • 평점, 리뷰수 컬럼 추가
    • 평점은 ReviewRepository를 통해 조회된 리뷰들에 대한 별점의 평균을 계산하고, 소수점 첫째 자리까지 반올림 처리함

📸 스크린샷

사진 설명
image gender=w
image gender=m
image 코치 상세 정보 조회 시 countOfReviews 값 추가
image 인기 코치 리스트 조회 시 reviewRating 값 추가

논의 사항 (선택)

  • QueryDSL을 사용하여 성별 필터링을 포함한 복잡한 쿼리를 처리하려고 했으나, 여러 가지 예상치 못한 이슈(QueryDSL 설정 문제, 쿼리 복잡성 등)가 발생하여 구현에 예상보다 시간이 더 소요될 것으로 판단되었습니다.
  • 따라서, 우선 프로젝트 일정에 영향을 주지 않도록 기존 방식(JPQL)을 사용하여 성별 필터링 로직을 구현했습니다. 향후 QueryDSL을 적용할 수 있도록 리팩토링을 고려할 수 있으며, 현재로서는 안정성과 개발 속도를 우선시하여 진행하게 되었습니다.

closed #335

@jeeehdev jeeehdev self-assigned this Nov 19, 2024
@jeeehdev jeeehdev linked an issue Nov 19, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

@ckwogus37 ckwogus37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 확인했습니다!

@habbiness habbiness requested a review from ksy90101 November 19, 2024 10:18
@jeeehdev jeeehdev merged commit 2db9eab into main Nov 19, 2024
1 check passed
Copy link
Contributor

@habbiness habbiness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 확인했습니다! 수고하셨습니당

@habbiness habbiness deleted the refactor/335-refactor-coachlist-api branch November 19, 2024 10:52
}

private GenderEnum parseGender(String gender) {
if (gender == null || gender.isEmpty()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gender가 왜 null일수 있나요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] Refactor CoachList API

5 participants