Commit 3cdb3b9
authored
[FEATURE] 봉사자 프로필 조회 기능 추가 (#323)
* refactor(volunteer): 프로필 관련 미사용 코드 제거
- 사용되지 않는 기존의 VolunteerProfile 조회 메서드 및 테스트 제거
- VolunteerQueryUseCase와 VolunteerQueryServiceTest에서 불필요한 import 삭제
* feat(volunteer): 봉사자 프로필 조회 기능 추가
- VolunteerProfileResponseDto 생성 및 봉사자 DTO 정의
- GetVolunteerProfileUseCase 인터페이스 및 구현체 추가
- VolunteerProfileQueryController에서 프로필 조회 기능 수정 및 서비스 연동
- 관련 도메인, 유즈케이스 의존성 업데이트
* test(volunteer): 유저 아이디 기준 봉사자 프로필 조회 서비스 테스트 추가
- 성공적인 봉사자 프로필 조회 테스트 케이스 작성
- 존재하지 않는 봉사자 프로필 조회 시 예외 발생 테스트 포함
* refactor(service): 클래스명 리팩터링
- NEWRegisterVolunteerService를 RegisterNEWVolunteerService로 클래스명 변경
- 관련 테스트 클래스 및 필드명도 동일하게 수정
* feat(volunteer): 프로필 조회 로직 및 메서드 확장 구현
- 봉사자 ID를 기반으로 프로필 조회 기능 추가
- VolunteerQueryUseCase에 `getById` 및 `getUserIdById` 메서드 확장
- VolunteerProfileQueryController에 새로운 엔드포인트 추가:
- `GET /user-id/{userId}`: 유저 ID 기반 프로필 조회
- `GET /volunteer-id/{volunteerId}`: 봉사자 ID 기반 프로필 조회
- 기존 `getProfile` 메서드를 `getProfileByUserId`로 변경
- `getProfileByVolunteerId` 메서드 추가하여 봉사자 ID 활용 로직 연결
* test(service): 봉사자 조회 관련 테스트 케이스 추가
- 봉사자 ID로 봉사자를 조회하는 테스트 추가
- 봉사자 ID로 유저 ID를 조회하는 테스트 추가
- 기존 테스트의 DisplayName 수정 및 표현 개선
* refactor(service): 불필요한 코드 제거 및 변수명 변경
- `findVolunteer`와 `findVolunteerDetail` 메서드 제거
- 사용되지 않는 메서드로 판단하여 삭제
- `NEWVolunteerRepository` 변수명을 `volunteerRepository`로 변경
- 가독성 및 네이밍 일관성 강화1 parent e56b93c commit 3cdb3b9
File tree
14 files changed
+276
-243
lines changed- src
- main/java/com/somemore
- domains/volunteer
- dto/response
- service
- usecase
- volunteer
- controller
- dto
- service
- usecase
- test/java/com/somemore
- domains/volunteer/service
- volunteer/service
14 files changed
+276
-243
lines changedLines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 0 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 32 | | |
63 | 33 | | |
64 | 34 | | |
| |||
99 | 69 | | |
100 | 70 | | |
101 | 71 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 72 | | |
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 12 | | |
20 | 13 | | |
21 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
6 | 4 | | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | | - | |
| 35 | + | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
45 | 43 | | |
46 | 44 | | |
47 | | - | |
| 45 | + | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
59 | 54 | | |
60 | 55 | | |
61 | | - | |
62 | | - | |
| 56 | + | |
| 57 | + | |
63 | 58 | | |
64 | 59 | | |
65 | 60 | | |
Lines changed: 76 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
0 commit comments