-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] 유저 질문 및 답변 관련 API #864
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
base: develop
Are you sure you want to change the base?
Conversation
MemberQuestion.java & MemberAnswer.java 코드 구현 Related to: #861
QuestionReaction.java AnswerReaction.java QuestionReport.java 구현 Related to: #861
QuestionSaveRequest.java & MemberQuestionRepository.java 코드 구현 Related to: #861
MemberQuestionModifier.java & MemberQuestionRetriever.java 구현 Related to: #861
질문 작성 API 질문 수정 API 질문 삭제 API 답변 작성 API 답변 수정 API 답변 삭제 API 나도 궁금해요 토글 API 도움돼요 토글 API 질문 신고 API 질문 목록 조회 API 대기중인 질문 개수 조회 API Related to: #861
Related to: #861
Related to: #861
Lim-Changi
left a comment
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.
이외에는 추가 의견 없습니다!
기존 프로젝트 패턴들 활용해서 너무 잘 구현해주시느라 고생 많으셨습니다!!!
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.
해당 클래스는 호출이 안되고 있는 것 같은데, 어떤 용도로 쓰이는지 궁금합니다!
| log.info("tab: {}", tab); | ||
| log.info(questions.toString()); |
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.
요거는 제거해도 될 것 같아요!
| @Query("SELECT q FROM MemberQuestion q " + | ||
| "WHERE q.receiver.id = :receiverId " + | ||
| "AND EXISTS (SELECT 1 FROM MemberAnswer a WHERE a.question.id = q.id) " + | ||
| "ORDER BY q.createdAt DESC") | ||
| List<MemberQuestion> findAnsweredQuestions( | ||
| @Param("receiverId") Long receiverId, | ||
| Pageable pageable | ||
| ); | ||
|
|
||
| @Query("SELECT q FROM MemberQuestion q " + | ||
| "WHERE q.receiver.id = :receiverId " + | ||
| "AND NOT EXISTS (SELECT 1 FROM MemberAnswer a WHERE a.question.id = q.id) " + | ||
| "ORDER BY q.createdAt DESC") | ||
| List<MemberQuestion> findUnansweredQuestions( | ||
| @Param("receiverId") Long receiverId, | ||
| Pageable pageable | ||
| ); |
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.
제가 신고 정책을 잘 몰라서, 혹시 신고 여부나 누적 신고수는 관계없이 기본적으로 모든 질문들은 조회가 되는 게 맞나요??
🐬 요약
유저 질문 및 답변 관련 API
👻 유형
PR의 유형에 맞게 체크해주세요!
🍀 작업 내용
PR에 담긴 작업 내용을 작성해주세요!
🌟 관련 이슈
PR과 관련된 이슈 번호를 작성해주세요!
close: #861