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

[PC-443] 매치 프로필 누락 요소 및 통일되지 않은 변수명 수정 #38

Merged
merged 7 commits into from
Feb 2, 2025

Conversation

devchlee12
Copy link
Member

@devchlee12 devchlee12 commented Jan 31, 2025

🔗 관련 이슈

PC-443

✨ 작업 내용

  • 매치 프로필 누락 요소 추가
  • 통일 되지 않은 변수명들 수정

✅ 체크리스트

  • 코드가 정상적으로 컴파일되나요?
  • 테스트 코드를 통과했나요?
  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?

🎃 새롭게 알게된 사항

📋 참고 사항

@devchlee12 devchlee12 requested a review from Lujaec January 31, 2025 14:53
@devchlee12 devchlee12 self-assigned this Jan 31, 2025
…s-response

# Conflicts:
#	api/src/main/java/org/yapp/domain/match/application/MatchService.java
#	api/src/main/java/org/yapp/domain/match/presentation/dto/response/MatchProfileBasicResponse.java
Copy link

github-actions bot commented Jan 31, 2025

Unit Test Results

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 814f99a.

♻️ This comment has been updated with latest results.


public static MatchProfileBasicResponse fromProfile(Long matchId, Profile profile) {
String nickname = profile.getProfileBasic().getNickname();
LocalDate birthDate = profile.getProfileBasic().getBirthdate();
LocalDate now = LocalDate.now();
String age = String.valueOf(Period.between(birthDate, now).getYears());
Integer age = Period.between(birthDate, now).getYears();
Copy link
Member

Choose a reason for hiding this comment

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

Profilebasic profileBasic = profile.getProfileBasic() 으로 profileBasic 변수를 따로 빼서 값들을 설정하는 것이 어떨까요 ?

ProfileBasic이 수정되는 경우 따로 변수를 빼서 값들을 설정하는 방식이 더 좋아보이기에 제안합니다 !

Copy link
Member Author

Choose a reason for hiding this comment

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

좋은 생각인 것 같습니다!
그렇게 하면 코드가 더 깔끔해지겠네요.
수정하겠습니다.

MatchInfoResponse response = MatchInfoResponse.builder()
.matchId(matchInfo.getId())
.matchStatus(getMatchStatus(userId, matchInfo))
.shortIntroduce("") // Deprecated 된 BIO 에서 넣어야하는지?
.description(matchedUser.getProfile().getProfileBasic()
Copy link
Member

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.

옙 동의합니다

@devchlee12
Copy link
Member Author

수정완료했습니다!

@devchlee12 devchlee12 requested a review from Lujaec February 2, 2025 08:13
@Lujaec
Copy link
Member

Lujaec commented Feb 2, 2025

수정완료했습니다!

고생하셨습니다 !

@devchlee12 devchlee12 merged commit 4fa9544 into develope Feb 2, 2025
1 of 2 checks passed
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.

2 participants