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

Feat: RunningRecord controller record 추가 api 추가 #52

Merged
merged 7 commits into from
Aug 8, 2024

Conversation

Jaewon-pro
Copy link
Member

🔗 이슈 연결

🚀 구현한 API

  • POST api/v1/running-records: 혼자 뛰기 러닝 기록 추가

💡 반영할 내용 및 변경 사항 요약

  • 혼자 뛰기 러닝 기록 추가 API를 추가해요.
  • RunningRecordService addRunningRecord 메서드에서는 request 값이 올바른지 검증하고 값을 저장해요
    • start_at이 end_at보다 빨라야 함
    • route의 좌표들은 2개 이상이어야 함
  • RunningEmoji에 client와 정의한 enum 이름에 맞게 수정해요
    • NORMAL -> SOSO

🔍 리뷰 요청/참고 사항

  • MemberEntityBadge 엔티티가 없어서, fetch join을 사용할 수 없어요.
    그래서 JPQL을 사용해서 dto projection하려니, 문자열로 SQL을 적는거랑 다름이 없는 것 같아요.
    • QueryDSL이나 Jooq와 같은 프레임워크를 도입하면 좋을 것 같아요
    • 지금은 member가 badge가 있더라도, profileUrl은 null을 반환해요
  • 챌린지 부분은 아직 구현되지 않은 상태여서, request, response 스키마에만 id로만 존재해요.
    • 챌린지 기능이 있어야 한다는 점은 TODO 주석으로 남겨두었어요

@Jaewon-pro Jaewon-pro added the feature 기능 추가 label Aug 7, 2024
@Jaewon-pro Jaewon-pro self-assigned this Aug 7, 2024
@Jaewon-pro Jaewon-pro requested a review from hee9841 August 7, 2024 11:46
Copy link
Collaborator

@hee9841 hee9841 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다. 코드가 전반적으로 깔끔한 것 같아요👍

// FIXME: badge에 left join해서 같이 조회하기
Member member =
memberRepository.findById(memberId).orElseThrow(() -> new NotFoundException(Member.class, memberId));
// TODO: 챌린지 기능 추가 후 수정
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

Copy link
Member Author

Choose a reason for hiding this comment

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

이 부분은 스크럼때, 여기 이슈에서 논의해보면 좋을 것 같아요!

@hee9841 hee9841 self-requested a review August 8, 2024 10:52
hee9841
hee9841 previously approved these changes Aug 8, 2024
Copy link
Collaborator

@hee9841 hee9841 left a comment

Choose a reason for hiding this comment

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

수고 많이셨습니다 👍

@Jaewon-pro Jaewon-pro merged commit 425f2f1 into main Aug 8, 2024
1 check passed
@Jaewon-pro Jaewon-pro deleted the feature/#30/add-running-record branch August 8, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

혼자 뛰기 기능
2 participants