Commit 28badd4
authored
feat(Volunteer): 봉사자 조회, 상세 조회, 검증 (#95)
* refactor(Volunteer): Find UseCase/Service를 Query UseCase/Service 로 통합
* feat(BadRequestException): 메시지 타입을 ExceptionMessage도 가능하게 오버로딩
* refactor: 클래스 명 변경
* feat(VolunteerDetail): 레포지토리 인터페이스, 구현체 추가, 리픽토링
* feat(Volunteer): Volunteer 쿼리 서비스 추가
* feat(Volunteer): 레포지토리 인터페이스, 구현체 추가, 리팩토링
* feat(Volunteer): 존재하지 않는 봉사자 처리 메시지 추가
* feat(VolunteerDetail): baseEntity 상속
* feat: Volunteer 및 VolunteerDetail 엔티티를 위한 DTO 변환 기능 추가
- Volunteer, VolunteerDetail 데이터 매핑.
- VolunteerDetail 포함/미포함 두 가지 방식 지원.
* refactor: 기존의 findService를 QueryService로 리팩토링
* feat(VolunteerQueryController): 프로필 조회 기능 추가
* feat(VolunteerApply): 엔티티와 ApplyStatus ENUM 추가
* feat(VolunteerDetailRepository): 사용하지 않는 메서드 삭제
* test(VolunteerRepository): 봉사자 id, OAuth id로 봉사자 정보 조회 테스트 추가
* test(RecruitBoardFixture): completed 상태의 RecruitBoard 생성 추가
- 리플렉션을 이용해서 status를 수정.
* test(RecruitBoardRepository): findNotCompletedIdsByCenterId 추가
- 센터 아이디로 종료되지 않았고 삭제되지 않은 RecruitBoard의 아이디 리스트를 반환
- 자동 정렬
* feat(VolunteerApplyRepository): 봉사 신청 repository 추가
- save: 봉사 신청 데이터를 저장
- findById: 봉사 신청 ID로 조회
- findVolunteerIdsByRecruitIds: 모집글 ID 리스트로 봉사자 ID 리스트 조회
- findAllByRecruitId: 모집글 ID로 페이징된 봉사 신청 조회
- isNotDeleted: 논리 삭제된 데이터 제외 조건 추가
- toOrderSpecifiers: Sort 객체를 기반으로 정렬 조건 생성
- getCount: 페이징 처리를 위한 총 데이터 개수 조회 메서드 추가
* feat(RecruitBoardQueryService): 기관 아이디 기반으로 종료되지 않은 RecruitBoard 아이디 리스트 조회 추가
- getNotCompletedIdsByCenterIds
* feat(VolunteerApplyJpaRepository): JpaRepo 상속 추가
* feat(VolunteerQueryService): 닉네임 조회 값 null 처리
* feat(VolunteerApplyQueryService): 봉사 신청 Query Service/UseCase 추가
- getVolunteerIdsByRecruitIds: 모집글 ID 리스트로 봉사자 ID 리스트 조회
* test: tearDown을 @transactional로 변경
* feat(VolunteerDetailAccessValidator): 봉사자 상세 정보 접근 검증 로직 구현
- 완료되지 않은 모집글 ID 조회 및 봉사자 ID와의 매칭 검증
- 타겟 봉사자 ID가 모집글과 연관되지 않은 경우 예외 처리
- RecruitBoardQueryUseCase와 VolunteerApplyQueryUseCase를 활용
* test(RecruitBoardQueryService): 센터 아이디로 완료되지 않은 모집 게시글의 ID 조회 테스트 추가
* test(RecruitBoardQueryRepository): 센터 아이디로 완료되지 않은 모집 게시글의 ID 조회 테스트 추가
* test(VolunteerApplyQueryService): 모집 아이디로 봉사자 아이디 리스트 조회 테스트 추가
* test(VolunteerApplyRepository): 봉사 신청/조회, 모집 ID로 봉사자 ID 리스트/페이징 조회
* test(VolunteerDetailRepository): 봉사자 ID로 봉사자 상세 정보 조회/저장
* test(VolunteerQueryService): 기관의 봉사자 상세 정보 조회에 대한 권한 검증 추가
* test(VolunteerDetailAccessValidator): 봉사자 상세 정보를 기관이 조회하는 테스트 추가
* test(VolunteerQueryService): 봉사자 기본/상세 정보 조회 테스트, 닉네임 조회 테스트 추가
- beforeEach 를 transactional로 변경
* feat(IntegrationTestSupport): @AutoConfigureMockMvc 추가
* test(VolunteerSignController): ControllerTestSupport 상속받도록 변경
* test(center): 공백 제거
* test(VolunteerQueryController): 타인 프로필 조회 컨트롤러 테스트 추가
* test(ControllerTestSupport): 필터 OFF
* test(VolunteerController): 컨트롤러 테스트 삭제
* feat(VolunteerQueryController): @secured 적용, Mapping 리팩토링
* feat(UserRole): GrantedAuthority 상속, authority 필드, 정적 메서드 from 추가
* feat(UserRole): UserRole.name() 사용에서 명시적인 Authority 필드 반환 메서드로 변경
* feat(CookieService): 토큰 로그 추가
* feat(DevAccountSetUpConfig): repository 변경, .name()을 .getAuthority로 변경
* feat(HmacJwtGenerator): 일관성 있는 상수 처리
* refactor(JwtAuthFilter): 리팩토링, name() 사용 제거
* feat(SecurityConfig): @slf4j, (securedEnabled = true) 추가로 @secured 작동하도록 수정
* cicd(jacoco): controller 패키지를 테스트 커버리지에서 제외
- 나는 컨트롤러 테스트가 밉다.
* refactor(VolunteerDetailAccessValidator): elseThrow 반환이 없는 것을 anyMatch로 수정
* feat(VolunteerQueryController): 성공 메시지 변경
* refactor(sonar 반영): unused import, chaining join, 명시적인 엔티티 default fields
* fix(VolunteerApplyQueryServiceTest): builder는 기본 값이 설정되지 않는 문제 해결
* refactor(VolunteerQueryService): 인터페이스 의존으로 수정
* test(VolunteerResponseDto): 봉사자 응답 정보 스웨거 어노테이션 추가
* chore(package): 패키지이름 대문자 수정
* style(개행): git 잠재적인 문제 예방1 parent 8ed8bd0 commit 28badd4
File tree
57 files changed
+1729
-620
lines changed- src
- main/java/com/somemore
- auth
- cookie
- jwt
- domain
- filter
- generator
- service
- oauth/handler/success
- util
- domains
- facade/validator
- global
- configure
- exception
- recruitboard
- repository
- service/query
- usecase/query
- volunteerapply
- domain
- repository
- service
- usecase
- volunteer
- controller
- domain
- dto/response
- repository
- service
- usecase
- test/java/com/somemore
- auth/jwt/service
- center/controller
- common/fixture
- facade/validator
- interestcenter/service
- recruitboard
- repository
- service/query
- volunteerapply
- repository
- service
- volunteer
- controller
- repository
- service
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
57 files changed
+1729
-620
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 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 | + | |
7 | 30 | | |
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 51 | | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
This file was deleted.
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
44 | | - | |
| 41 | + | |
| 42 | + | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
Lines changed: 0 additions & 25 deletions
This file was deleted.
0 commit comments