-
Notifications
You must be signed in to change notification settings - Fork 4
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 : 신고기능 개발 #453
Merged
kkkapuq
merged 22 commits into
Kernel360:develop
from
kkkapuq:feature/#449_add_report_function
May 8, 2024
Merged
Feat : 신고기능 개발 #453
kkkapuq
merged 22 commits into
Kernel360:develop
from
kkkapuq:feature/#449_add_report_function
May 8, 2024
Conversation
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
orury-domain/src/main/java/org/orury/domain/user/domain/entity/Report.java
Show resolved
Hide resolved
GBGreenBravo
requested changes
Apr 30, 2024
orury-client/src/main/java/org/orury/client/user/application/UserServiceImpl.java
Show resolved
Hide resolved
orury-domain/src/main/java/org/orury/domain/user/domain/entity/Report.java
Outdated
Show resolved
Hide resolved
GBGreenBravo
approved these changes
May 2, 2024
c0olcode
approved these changes
May 7, 2024
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.
수고하셨습니다 !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요
게시글, 댓글에 대한 신고기능을 추가했습니다.
Report를 어떤 도메인에 넣어야 하나 좀 고민을 했는데, 게시글이나 댓글에 대한 신고여도 결국은 유저를 제제하기 위함이니, 유저 도메인에서 개발을 진행했습니다.
게시글, 댓글에 대한 타입을 request로 받아서 report 테이블에 저장하는 로직입니다.
상세 내용
report 테이블
reason은 ReportInfo의 코드,
type은 ReportType의 코드값과 매핑됩니다.
타입에 따른 분기처리
이부분을 좀 깔끔하게 코드를 작성하고싶었는데.. 함수로 따로 빼도 if문의 연속이라 그냥 serviceImpl에 로직을 박았습니다.
로그인의 전략패턴처럼 한다면 할 수는 있는데.. 뭔가 이거 하나를 위해서 전략패턴을 적용하는건 또 그거 나름대로 오버엔지니어링인것같고..
좋은 코드로 개선할 수 있도록 피드백 주시면 감사하겠습니다.
closed #449
PR 유형
어떤 변경 사항이 있나요?
PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.