-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEAT] Soft Delete 기능 구현 + 과거 문답 리스트 조회 로직 수정 #109
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f7dfb7a
[FEAT] 회원 탈퇴시에 soft delete가 일어나도록 구현 #105
ddongseop 8cdadc7
[FIX] 탈퇴한 유저도 조회할 수 있는 함수에 의존하지 않도록 변경 #105
ddongseop 14f3c79
Merge remote-tracking branch 'origin/develop' into feat/#105-soft_del…
ddongseop 583a786
[CHORE] pkg 파일 삭제
ddongseop f6bab4a
[FEAT] 둘다 탈퇴한 경우만 soft delete 실행하도록 수정 #105
ddongseop 88db9de
[FEAT] 오늘의 질문 답변 완료 시 한번에 뜨도록 개선
ddongseop 5ad588e
[CHORE] soft delete시에 로그를 출력하도록 변경 #105
ddongseop 05afc1d
[FIX] stream 사용 코드로 변경 및 엔티티 삭제 순서 변경 #105
ddongseop 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
Binary file not shown.
This file contains 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 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 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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
import lombok.*; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.hibernate.annotations.SQLDelete; | ||
import org.hibernate.annotations.Where; | ||
import sopt.org.umbba.common.exception.ErrorType; | ||
import sopt.org.umbba.common.exception.model.CustomException; | ||
import sopt.org.umbba.domain.domain.common.AuditingTimeEntity; | ||
|
@@ -19,6 +21,8 @@ | |
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
@SQLDelete(sql = "UPDATE parentchild SET deleted=true WHERE parentchild_id=?") | ||
@Where(clause = "deleted=false") | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오오 soft delete 이렇게 쓰는거구나! 배우고 갑니다 👍 |
||
public class Parentchild extends AuditingTimeEntity { | ||
|
||
@Id | ||
|
@@ -81,6 +85,8 @@ public void changeParentOnboardingAnswerList(List<OnboardingAnswer> onboardingAn | |
@Column(nullable = false) | ||
private LocalTime pushTime; // default: 오후 11시(클라이언트) | ||
|
||
private boolean deleted = Boolean.FALSE; | ||
|
||
Comment on lines
+88
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 테스트 결과 확인했습니당 |
||
public void initQnA() { | ||
qnaList = new ArrayList<>(); | ||
} | ||
|
This file contains 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 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 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 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 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.
오오 이거 변수로 뺀 거 넘 좋다