[DP-307/308] 커뮤니티 게시글/답변 삭제, 중복 제출, 목록 필드 누락, 타임스탬프 불일치 수정#122
Merged
nYeonG4001 merged 2 commits intodevelopV2from Apr 12, 2026
Merged
[DP-307/308] 커뮤니티 게시글/답변 삭제, 중복 제출, 목록 필드 누락, 타임스탬프 불일치 수정#122nYeonG4001 merged 2 commits intodevelopV2from
nYeonG4001 merged 2 commits intodevelopV2from
Conversation
|
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
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.



수정 내용
1. 게시글/답변 삭제 안 됨
deletePost/deleteAnswer에서 자식 레코드(comments, answer_likes, post_likes, ai_answers, ai_questions, history) 순서대로 먼저 삭제 후 부모 삭제2. 동일한 글 2개 생성 (중복 제출)
3. GET /posts 필드 누락 (answerCount, contentPreview, topAnswerPreview)
PostSummaryResponse에 해당 필드 미구현4. 답변 createdAt ≠ updatedAt (처음 작성인데 수정됨으로 표시)
BaseTimeEntity.@PrePersist에서LocalDateTime.now()두 번 호출 → 나노초 차이변경 파일
BaseTimeEntity— PrePersist 타임스탬프 단일화CommentRepository,AnswerLikeRepository,PostLikeRepository,AiAnswerRepository,AiQuestionRepository,AnswerRepository,HistoryRepository— 삭제 쿼리 추가PostRepository— 중복 제출 체크 메서드 추가ErrorCode— COMMUNITY_013 추가PostSummaryResponse— answerCount, contentPreview, topAnswerPreview 필드 추가PostService,AnswerService— 삭제 로직 및 중복 방지 로직 적용