Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#103] 전체, 연간, 월간 모든 위치 데이터 랭킹 조회 API 구축 #105

Merged
merged 1 commit into from
May 29, 2024

Conversation

yel-m
Copy link
Member

@yel-m yel-m commented May 29, 2024

#️⃣ 연관된 이슈

Resolves #103

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요 (이미지 첨부 가능)

  • 전체, 연간, 월간 모든 위치 랭킹 조회 API를 구축했습니다.

  • 기존 getLocationRankings 메서드를 오버로딩하여 두 가지 버전으로 분리했습니다.

    record 리스트와 topCount를 인자로 함께 받는 메서드는 topCount 파라미터를 받아 상위 N개의 활동 랭킹을 반환합니다.
    record 리스트만 인자로 받는 메서드는 topCount 파라미터 없이 모든 활동 랭킹을 반환합니다. 이 메서드는 존재하는 데이터까지만 반환하며, 데이터가 없는 경우 null 값을 반환하지 않습니다.

api/report/all/ranking/locations로 요청 시 다음과 같은 결과를 얻을 수 있습니다.

{
  "success": true,
  "code": 0,
  "message": "전체 시간대 행복도 순위를 성공적으로 조회했습니다.",
  "data": [
    {
      "ranking": 1,
      "time_of_day": "새벽"
    },
    {
      "ranking": 2,
      "time_of_day": "아침"
    },
    {
      "ranking": 3,
      "time_of_day": "저녁"
    },
    {
      "ranking": 4,
      "time_of_day": ""
    },
    {
      "ranking": 5,
      "time_of_day": ""
    }
  ]
}

스크린샷 (선택)

💬 리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

✅ Check List

  • PR 제목을 커밋 규칙에 맞게 작성했는가?
  • PR에 해당되는 Issue를 연결했는가?
  • 적절한 라벨을 설정했는가?
  • 작업한 사람을 모두 Assign했는가?

@yel-m yel-m requested a review from KkomSang May 29, 2024 05:41
@yel-m yel-m self-assigned this May 29, 2024
@yel-m yel-m added the feat 새로운 기능을 추가합니다 label May 29, 2024
@KkomSang
Copy link
Collaborator

너무너무 수고했습니당👍👍👍👍👍👍

@KkomSang KkomSang merged commit b129f44 into develop May 29, 2024
1 check failed
@KkomSang KkomSang deleted the feat/#103 branch May 29, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능을 추가합니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants