Skip to content

Conversation

@west-eastH
Copy link
Contributor

✨ 연관된 이슈

아직


📝 작업 내용 (주요 변경 사항)

  • 일정 조회 API
  • 일정 참여 API
  • 일정 참여 취소 API

💬 리뷰 요구사항

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

@west-eastH west-eastH requested a review from choiseoji July 31, 2025 06:01
@west-eastH west-eastH self-assigned this Jul 31, 2025
@west-eastH west-eastH added the ✨feat 기능 개발 시 label Jul 31, 2025
@github-actions
Copy link

Test Coverage Report

Overall Project 54.2% -4.65% 🍏
Files changed 54.12% 🍏

File Coverage
EventException.java 100% 🍏
EventErrorCode.java 100% 🍏
JoinEvent.java 100% 🍏
EventStatus.java 100% 🍏
EventService.java 92.94% 🍏
Event.java 52.71% -40.39%
PeriodicEvent.java 45.33% 🍏
EventDetailResponse.java 0%
ParticipantDto.java 0%
EventController.java 0% -70.59%
EventMapper.java 0% -10.94%

Copy link
Contributor

@choiseoji choiseoji left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

Comment on lines +41 to +58
@Mapping(target = "startDateTime", expression = "java(java.time.LocalDateTime.of(event.getDate(), event.getStartTime()))")
@Mapping(target = "endDateTime", expression = "java(java.time.LocalDateTime.of(event.getDate(), event.getEndTime()))")
@Mapping(target = "startLocation", source = "event.place")
@Mapping(target = "runningLeaderId", source = "event.member.id")
@Mapping(target = "distanceKm", source = "event.distanceKm")
@Mapping(target = "runningTime", source = "event.runningTime")
EventDetailResponse toEventDetailResponse(Event event, EventStatus status, List<ParticipantDto> participants);

@Mapping(target = "id", source = "member.id")
@Mapping(target = "name", source = "member.nickname")
@Mapping(target = "image", source = "member.profileImage")
ParticipantDto toParticipantDto(JoinEvent joinEvent);

default List<ParticipantDto> toParticipantDtoList(List<JoinEvent> joinEvents) {
return joinEvents.stream()
.map(this::toParticipantDto)
.toList();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

근데 이거 어떤거 Mapping으로 하고, 어떤건 default로 한 기준이 궁금합니다!
저는 모든 필드에 Mapping 다 할거면 그냥 default로 빌더 써서 했고, responseDto 만드는 거에 대해서만 map-struct 사용했는데 동현님은 어떤 기준으로 한건지 궁금합니다..

JoinEvent joinEvent = joinEventRepository.findByEventAndMember(event, member)
.orElseThrow(JoinEventNotFound::new);

joinEvent.softDelete();
Copy link
Contributor

Choose a reason for hiding this comment

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

이거 sortDelete() 직접 구현해도 좋고
JoinEvent Entity 상단에
@SQLDelete(sql = "UPDATE JoinEvent SET deleted_at = NOW() where join_event_id = ?")
이런 식으로 해서 자동으로 적용 되도록 해도 좋아요!!

@west-eastH west-eastH merged commit 8caf834 into develop Aug 1, 2025
1 check passed
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.

3 participants