File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
src/main/java/com/somemore/volunteer Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 11package com .somemore .volunteer .service .query ;
22
3+ import com .somemore .volunteer .domain .Volunteer ;
4+ import com .somemore .volunteer .dto .response .VolunteerForCommunityResponseDto ;
35import com .somemore .volunteer .repository .VolunteerRepository ;
46import com .somemore .volunteer .usecase .query .FindVolunteerIdUseCase ;
57import jakarta .persistence .EntityNotFoundException ;
@@ -24,4 +26,16 @@ public UUID findVolunteerIdByOAuthId(String oAuthId) {
2426 .orElseThrow (EntityNotFoundException ::new )
2527 .getId ();
2628 }
29+
30+ @ Override
31+ public String getNicknameById (UUID id ) {
32+ return volunteerRepository .findNicknameById (id );
33+ }
34+
35+ @ Override
36+ public VolunteerForCommunityResponseDto getVolunteerDetailForCommunity (UUID id ) {
37+ Volunteer volunteer = volunteerRepository .findById (id );
38+
39+ return VolunteerForCommunityResponseDto .fromEntity (volunteer );
40+ }
2741}
Original file line number Diff line number Diff line change 11package com .somemore .volunteer .usecase .query ;
22
3+ import com .somemore .volunteer .dto .response .VolunteerForCommunityResponseDto ;
4+
35import java .util .UUID ;
46
57public interface FindVolunteerIdUseCase {
68 UUID findVolunteerIdByOAuthId (String oAuthId );
9+ String getNicknameById (UUID id );
10+ VolunteerForCommunityResponseDto getVolunteerDetailForCommunity (UUID id );
711}
You can’t perform that action at this time.
0 commit comments