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

Feature/party 업데이트,조회 수정, 약속 시간 기능 추가 #69

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

daeundada
Copy link
Member

No description provided.

@daeundada daeundada changed the title Feature/party Feature/party 업데이트,조회 수정, 약속 시간 기능 추가 Jan 17, 2024
Copy link
Collaborator

@kdy9960 kdy9960 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 ^^

Copy link
Contributor

@wkdehdgk159 wkdehdgk159 left a comment

Choose a reason for hiding this comment

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

예외처리 사항까지 잘 고민해주셨네요 하하

Party party = partyRepository.findById(partyId).orElseThrow(PartyNotFoundException::new);
Party party = partyRepository.findById(partyId)
.filter(p -> !p.isDeleted()) // 삭제 되지 않은 파티만 필터링
.orElseThrow(PartyNotFoundException::new);

List<MemberResponseDTO> members = partyUserRepository.findUsersByPartyId(partyId).stream()
Copy link
Member

Choose a reason for hiding this comment

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

getPartyDto메서드와 getUserPartyMap메서드에서 partyUserRepository.findUsersByPartyId를 MemberResponseDTO로 변환하는 로직이 중복되어 있는데, 이걸 메서드로 추출하지 않고 중복으로 사용한 이유가 있을까요?

@@ -108,11 +130,19 @@ private Party getUserParty(Long partyId, User user) {
public void joinParty(Long partyId, User user) {
Party party = getUserParty(partyId, user);

// 현재 날짜를 가져옵니다.
LocalDateTime now = LocalDateTime.now();
Copy link
Member

Choose a reason for hiding this comment

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

다른 시간대를 다룰 경우를 대비해서 ZonedDateTime 사용은 어떠신가요?

@wkdehdgk159 wkdehdgk159 merged commit b9b7d28 into dev Jan 19, 2024
@daeundada daeundada self-assigned this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants