[Feat]#108 community 응답 필드 추가 및 수정 - #110
Conversation
상세 조회 응답에 category, numComments, numLikes, isLiked, isMine 을 추가한다. 필드명은 목록 조회 응답과 동일하게 맞춘다. - isLiked/isMine 판별에 조회자 ID가 필요해 상세 조회에도 @AuthenticationPrincipal 을 추가한다(좋아요/삭제 API와 동일한 방식). - numComments 는 소프트 삭제된 댓글을 제외하기 위해 countByCommunityAndDeletedAtIsNull 을 새로 추가해 집계한다. - isLiked/isMine 은 Jackson 이 is 접두사를 제거하지 않도록 @JsonProperty 로 이름을 고정한다(ApiResponse 의 isSuccess 와 동일). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
상세 조회가 목록용 대표 이미지 로직을 재사용해 display_order 가 가장 작은 1장만 반환하고 있었다. 등록 시 여러 장이 저장되지만 2번째 이후 이미지는 조회 경로가 없어 노출되지 않았다. - CommunityDetailResponseDTO 의 imageUrl(String) 을 imageUrls(List<String>) 로 교체한다. 첨부가 없으면 빈 배열이다. - findByCommunityOrderByDisplayOrderAsc 를 추가해 등록 순서대로 조회하고, 상세에서만 쓰이던 findFirstByCommunityOrderByDisplayOrderAsc 와 getRepresentativeImageUrl 을 제거한다. - 목록 조회는 기존대로 대표 이미지 1장(imageUrl)을 유지한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 42 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
커뮤니티 게시글 상세 조회 응답을 보강하여, 첨부 이미지 전체 반환 및 상세 응답에 댓글/좋아요/플래그 정보를 포함하도록 확장한 PR입니다.
Changes:
- 상세 조회에서 대표 이미지 1장 대신 첨부 이미지 전체(imageUrls) 를 Presigned URL로 변환해 반환
- 상세 응답에 댓글 수, 좋아요 수, isLiked, isMine 필드 추가
- 이를 위해 이미지/댓글 관련 Repository 조회 메서드 확장 및 Converter/Controller 시그니처 갱신
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/redo/domain/community/service/CommunityService.java | 상세 조회 시 이미지 전체/댓글 수/좋아요 여부/작성자 여부를 계산해 응답에 포함 |
| src/main/java/com/redo/domain/community/repository/CommunityImgRepository.java | 상세 조회용 이미지 전체 조회 메서드로 변경 |
| src/main/java/com/redo/domain/community/repository/CommunityCommentRepository.java | 상세 조회용 댓글 수 count 메서드 추가 |
| src/main/java/com/redo/domain/community/dto/res/CommunityDetailResponseDTO.java | 상세 응답 스키마 확장(imageUrls, category, counts, flags) |
| src/main/java/com/redo/domain/community/converter/CommunityConverter.java | 상세 응답 생성 로직을 신규 필드에 맞게 갱신 |
| src/main/java/com/redo/domain/community/controller/CommunityController.java | 상세 조회 API에 userId 주입 후 서비스 호출 시그니처 갱신 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -98,10 +99,24 @@ public CommunityDetailResponseDTO getCommunityPost(Long communityId) { | |||
| getNickname(profile), | |||
| getProfileImageUrl(profile), | |||
| getCharacterCode(profile), | |||
| getRepresentativeImageUrl(community) | |||
| getImageUrls(community), | |||
| communityCommentRepository.countByCommunityAndDeletedAtIsNull(community), | |||
| isLiked(userId, community), | |||
| isMine(userId, community) | |||
| ); | |||
#️⃣연관된 이슈
📝작업 내용
스크린샷 (선택)
💬리뷰 요구사항(선택)
PR 전 필수 체크리스트
테스트 결과