Skip to content

Commit 27f328d

Browse files
committed
feat(volunteer): volunteer Query Usecase 및 Service에 volunteer 정보 조회 기능 추가
1 parent 76852a6 commit 27f328d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/main/java/com/somemore/volunteer/service/query/FindVolunteerIdService.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.somemore.volunteer.service.query;
22

3+
import com.somemore.volunteer.domain.Volunteer;
4+
import com.somemore.volunteer.dto.response.VolunteerForCommunityResponseDto;
35
import com.somemore.volunteer.repository.VolunteerRepository;
46
import com.somemore.volunteer.usecase.query.FindVolunteerIdUseCase;
57
import 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
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
package com.somemore.volunteer.usecase.query;
22

3+
import com.somemore.volunteer.dto.response.VolunteerForCommunityResponseDto;
4+
35
import java.util.UUID;
46

57
public interface FindVolunteerIdUseCase {
68
UUID findVolunteerIdByOAuthId(String oAuthId);
9+
String getNicknameById(UUID id);
10+
VolunteerForCommunityResponseDto getVolunteerDetailForCommunity(UUID id);
711
}

0 commit comments

Comments
 (0)