-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 회원 탈퇴 구현 및 투표 조회시 투표 득표수 보여주도록 수정 #292
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
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
23d2a25
[refactor] 안쓰는 삭제용 양방향 매핑 삭제 (#176)
hd0rable 91a02bc
[feat] 회원 탈퇴 시 연관된 오늘의 한마디 삭제 (#176)
hd0rable 71b6142
[feat] 회원 탈퇴 시 연관된 책 저장관계 삭제 (#176)
hd0rable 791c684
[feat] 회원 탈퇴 시 연관된 댓글 삭제 관련 메서드 작성 (#176)
hd0rable 8a61d66
[feat] 회원 탈퇴 시 연관된 댓글 삭제시 SETTER 추가 (#176)
hd0rable 951470a
[feat] 회원 탈퇴 시 연관된 댓글좋아요 삭제 관련 메서드 작성 (#176)
hd0rable 7357f80
[feat] 회원 탈퇴 관련 에러코드 추가 (#176)
hd0rable aee4840
[feat] 회원 탈퇴 시 연관된 피드 삭제 관련 메서드 작성 (#176)
hd0rable 5b4d0f1
[feat] 회원 탈퇴 시 연관된 피드 삭제 관련 메서드 작성 (#176)
hd0rable c9c7b1f
[feat] 회원 탈퇴 시 연관된 게시물 삭제시 SETTER 추가 (#176)
hd0rable cdaa6fd
[feat] 회원 탈퇴 시 연관된 게시물 좋아요 삭제 관련 메서드 작성 (#176)
hd0rable a294788
[feat] 회원 탈퇴 시 연관된 최근검색어 삭제 관련 메서드 작성 (#176)
hd0rable 32c54a0
[feat] 회원 탈퇴 시 연관된 기록 삭제 관련 메서드 작성 (#176)
hd0rable c3ffa05
[feat] 회원 탈퇴 시 연관된 방참여관계 삭제시 SETTER 추가 (#176)
hd0rable da887ca
[feat] 회원 탈퇴 시 연관된 방 참여관계 삭제 관련 메서드 작성 (#176)
hd0rable 186e6a0
[refactor] 기록 조회시 투표항목 득표수 보여주도록 수정 (#176)
hd0rable 42418ea
[feat] 회원 탈퇴 시 연관된 책 저장관계 삭제 메서드 추가(#176)
hd0rable e5af506
[feat] 회원 탈퇴 시 oauth2Id변경 메서드 유저 도메인에 추가 (#176)
hd0rable 42b4f73
[feat] 회원 탈퇴 컨트롤러 작성 (#176)
hd0rable 6c85c3c
[feat] 회원 탈퇴 유즈케이스 작성 (#176)
hd0rable 1451f16
[feat] 회원 탈퇴 유즈케이스 구현체 서비스메서드 작성 (#176)
hd0rable c678717
[feat] 회원 탈퇴 시 softDelete메서드 추가 (#176)
hd0rable 1e8aefc
[feat] 회원 탈퇴 시 유저삭제 관련 메서드 추가 (#176)
hd0rable d50f730
[feat] 토큰 추출 어노테이션 작성 (#176)
hd0rable 6da045e
[feat] 필터에서 토큰 등록/ 블랙리스트 토큰 검증 로직 추가 (#176)
hd0rable 28dbba4
[feat] 토큰 유효기간 추출 메서드 작성 (#176)
hd0rable 4f43183
[feat] 블랙리스트 토큰관련 레디스 어댑터 추가 (#176)
hd0rable 4b70301
[feat] 회원 탈퇴 시 연관된 투표 삭제 관련 메서드 작성 (#176)
hd0rable 04ca0b4
[feat] 회원 탈퇴 시 연관된 투표 삭제 관련 메서드 작성 (#176)
hd0rable 79e1fbf
[feat] 회원 탈퇴 시 연관된 투표 삭제시 SETTER 추가 (#176)
hd0rable c1de20b
[refactor] 투표시 투표항목 득표수 보여주도록 수정 (#176)
hd0rable f4497ad
[feat] 토큰 추출 어노테이션 작성 (#176)
hd0rable 583c6cc
[test] 테스트 팩토리 메서드 추가 (#176)
hd0rable b8d6899
[test] 회원 탈퇴 통합 테스트 코드 작성 (#176)
hd0rable 17324db
Merge remote-tracking branch 'origin/develop' into feat/#176-user-delete
hd0rable 868bc69
[refactor] 리뷰 반영 수정 (#176)
hd0rable cb58473
[refactor] 소프트 딜리트 명시 (#176)
hd0rable 62a4568
[refactor] 댓글 중복 집계 수정 (#176)
hd0rable 98fa05c
[refactor] 댓글 소프트 딜맅트 명시 및 변환 타입 명시 (#176)
hd0rable 5dd094c
[refactor] 에러코드 추가 (#176)
hd0rable 3666ce7
[refactor] 유저조회 UserJpaRepository에서 하도록 수정 (#176)
hd0rable 2272324
[refactor] 에러처리 추가 (#176)
hd0rable 3745996
[refactor] 주석정리 (#176)
hd0rable bdffe2e
[refactor] 득표 수 벌크쿼리 (#176)
hd0rable 05d2ade
[refactor] 투표 소프트 딜리트 명시 (#176)
hd0rable 720ec4f
[refactor] 블랙리스트 토큰 추가 시 관련 정보 함께 json형태로 추가 (#176)
hd0rable 3c530d5
[refactor] 스웨거 에러코드 추가 (#176)
hd0rable 7ea4c22
[refactor] 테스트코드 수정 (#176)
hd0rable 15e0a8a
[refactor] 탈퇴할 유저가 작성한 댓글 삭제와 관련된 영속성 코드 수정 (#176)
seongjunnoh bcf15c5
[test] CommentCommandPersistenceAdapter 테스트 코드 추가 (#176)
seongjunnoh 3bac26c
[refactor] 댓금 감소 로직 코드 순서 수정 (#176)
hd0rable be383b0
[refactor] 게시글 좋아요 감소 로직 코드 순서 수정 (#176)
hd0rable 63ffe7b
[refactor] 방 멤버수/진행도 업데이트 프로젝션 사용하여 집계쿼리로 수정 (#176)
hd0rable 7914efc
[refactor] 블랙리스트 토큰 로깅 수정 (#176)
hd0rable d53c265
[refactor] 테스트케이스 임포트문 수정 (#176)
hd0rable 6f5b2fe
[refactor] RoomAggregateProjection으로 dto 네이밍 변경 (#176)
hd0rable 858dc0f
Merge remote-tracking branch 'origin/develop' into feat/#176-user-delete
hd0rable File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/java/konkuk/thip/common/security/annotation/AuthToken.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package konkuk.thip.common.security.annotation; | ||
|
|
||
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| @Target(ElementType.PARAMETER) | ||
| @Retention(RetentionPolicy.RUNTIME) | ||
| public @interface AuthToken {} |
40 changes: 40 additions & 0 deletions
40
src/main/java/konkuk/thip/common/security/argument_resolver/AuthTokenArgumentResolver.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| package konkuk.thip.common.security.argument_resolver; | ||
|
|
||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import konkuk.thip.common.exception.AuthException; | ||
| import konkuk.thip.common.security.annotation.AuthToken; | ||
| import lombok.RequiredArgsConstructor; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.core.MethodParameter; | ||
| import org.springframework.stereotype.Component; | ||
| import org.springframework.web.bind.support.WebDataBinderFactory; | ||
| import org.springframework.web.context.request.NativeWebRequest; | ||
| import org.springframework.web.method.support.HandlerMethodArgumentResolver; | ||
| import org.springframework.web.method.support.ModelAndViewContainer; | ||
|
|
||
| import static konkuk.thip.common.exception.code.ErrorCode.AUTH_TOKEN_NOT_FOUND; | ||
|
|
||
| @Component | ||
| @Slf4j | ||
| @RequiredArgsConstructor | ||
| public class AuthTokenArgumentResolver implements HandlerMethodArgumentResolver { | ||
|
|
||
| @Override | ||
| public boolean supportsParameter(MethodParameter parameter) { | ||
| return parameter.hasParameterAnnotation(AuthToken.class) | ||
| && parameter.getParameterType().equals(String.class); | ||
| } | ||
|
|
||
| @Override | ||
| public String resolveArgument(MethodParameter parameter, | ||
| ModelAndViewContainer mavContainer, | ||
| NativeWebRequest webRequest, | ||
| WebDataBinderFactory binderFactory) { | ||
|
|
||
| Object token = ((HttpServletRequest) webRequest.getNativeRequest()).getAttribute("token"); | ||
| if (token == null) { | ||
| throw new AuthException(AUTH_TOKEN_NOT_FOUND); | ||
| } | ||
| return (String) token; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
빈 컬렉션 전달 시 예외 위험(Hibernate Parameter list is empty) + 상태 조건 보강
IN :postIds에 빈 리스트가 넘어가면 런타임 예외가 납니다. 호출부에서 빈 컬렉션이면 조기 반환하도록 가드가 필요합니다.레포지토리 쿼리 보강 예시(diff):
호출부 가드 예시(Java):
대량 ID 처리 시 DB 파라미터 한계에 걸릴 수 있으니(드라이버/DB별 제한) 어댑터 레벨에서 chunking(예: 1k~5k 단위)도 고려해 주세요.
🏁 Script executed:
Length of output: 495
🏁 Script executed:
Length of output: 6017
CommentJpaRepository.softDeleteAllByPostIds 호출부 및 쿼리 보강 필요
postIds가 null 또는 빈 리스트면 Hibernate에서 “Parameter list is empty” 런타임 예외 발생 → 호출부에 빈 리스트 조기 반환 로직 추가 필수AND c.status <> 'INACTIVE'조건 추가호출부 가드 예시:
🤖 Prompt for AI Agents