-
Notifications
You must be signed in to change notification settings - Fork 1
[FEATURE] 특정 모집글 봉사자 지원 조회 필드 추가 #280
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
Conversation
m-a-king
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨씁니다~
코드 스타일이 조금 달라지셨네요.
개행을 줄이셨는데 이유가 있으신가요?
| @Schema(description = "봉사 참여 여부", example = "false") | ||
| Boolean attended, | ||
| @Schema(description = "리뷰 작성 여부", example = "false") | ||
| Boolean isReviewed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 이겼군요...
| @Override | ||
| public VolunteerApplyWithReviewStatusResponseDto getVolunteerApplyByRecruitIdAndVolunteerId(Long recruitId, UUID volunteerId) { | ||
| VolunteerApply apply = volunteerApplyQueryUseCase.getByRecruitIdAndVolunteerId(recruitId, volunteerId); | ||
| boolean isReviewed = checkIfReviewed(apply); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰가 작성되어있을 때, 체크한다 이런 느낌인가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음.. 봉사 지원과 리뷰의 관계를 생각해봤을때, 봉사지원(상태가 APPROVED이고 참석여부가 TRUE일때)일때, 리뷰가 있을수도(작성했을 수도)없을 수도 있어서 위 메서드로 빼놨습니다.
즉, 리뷰 작성 가능성이 있을때, ReviewQueryUseCase로 조회하도록 했습니다.
@m-a-king 이전에 작성했던건 구글 컨벤션이어서.. 저번에 다시 default로 바꾸고 나서 코드 정렬 단축키 누르니까 바뀌는게 있더라구요. |
| throw new BadRequestException(UNAUTHORIZED_RECRUIT_BOARD); | ||
| private boolean checkIfReviewed(VolunteerApply apply) { | ||
| return apply.isVolunteerActivityCompleted() | ||
| && reviewQueryUseCase.existsByVolunteerApplyId(apply.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m-a-king
apply.isVolunteerActivityCompleted() == true 이면
reviewQueryUseCase.existsByVolunteerApplyId(apply.getId()) 이부분이 호출되면서 리뷰 작성 여부를 반환합니다.
반대로 전자가 false면 후자는 실행을 안하니까 조회 한번을 아낄수 있어요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다. 이해했습니다~
ayoung-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다
601d879 to
fb1f847
Compare
|



resolved :
📌 과제 설명
특정 모집글에 대한 봉사자 지원 조회시 작성 리뷰 여부 필드 추가
👩💻 요구 사항과 구현 내용
✅ PR 포인트 & 궁금한 점