Skip to content

[Feat]#108 community 응답 필드 추가 및 수정 - #110

Merged
Lee-Jungwoo merged 2 commits into
developfrom
feat/#108-community-response
Aug 3, 2026
Merged

[Feat]#108 community 응답 필드 추가 및 수정#110
Lee-Jungwoo merged 2 commits into
developfrom
feat/#108-community-response

Conversation

@Lee-Jungwoo

Copy link
Copy Markdown
Contributor

#️⃣연관된 이슈

#108

📝작업 내용

게시글 상세 조회에서 첨부 이미지 전체 반환하도록 수정
커뮤니티 게시글 상세 조회 API의 응답 필드 추가

스크린샷 (선택)

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.

PR 전 필수 체크리스트

  • 관련 이슈를 연결했습니다.
  • 로컬에서 정상 동작을 확인했습니다.
  • 필요한 테스트를 수행했습니다.
  • Swagger/API 명세를 업데이트했습니다.
  • 불필요한 로그 또는 주석을 제거했습니다.

테스트 결과

  • 단위 테스트
  • 통합 테스트
  • Swagger 테스트
  • Postman 테스트
  • 직접 실행 확인

정우 and others added 2 commits August 4, 2026 00:26
상세 조회 응답에 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>
@Lee-Jungwoo Lee-Jungwoo self-assigned this Aug 3, 2026
Copilot AI review requested due to automatic review settings August 3, 2026 15:34
@Lee-Jungwoo Lee-Jungwoo added the ✨ feat 새로운 기능 구현 label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Lee-Jungwoo, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c4276f7e-8cf2-4af6-88e7-6a1694f1b3bc

📥 Commits

Reviewing files that changed from the base of the PR and between 046e01a and e747f51.

📒 Files selected for processing (6)
  • src/main/java/com/redo/domain/community/controller/CommunityController.java
  • src/main/java/com/redo/domain/community/converter/CommunityConverter.java
  • src/main/java/com/redo/domain/community/dto/res/CommunityDetailResponseDTO.java
  • src/main/java/com/redo/domain/community/repository/CommunityCommentRepository.java
  • src/main/java/com/redo/domain/community/repository/CommunityImgRepository.java
  • src/main/java/com/redo/domain/community/service/CommunityService.java

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Lee-Jungwoo Lee-Jungwoo changed the title Feat/#108 community response [Feat]#108 community 응답 데이터 보강 Aug 3, 2026
@Lee-Jungwoo Lee-Jungwoo changed the title [Feat]#108 community 응답 데이터 보강 [Feat]#108 community 응답 필드 추가 및 수정 Aug 3, 2026
@Lee-Jungwoo
Lee-Jungwoo merged commit ded28bb into develop Aug 3, 2026
2 checks passed
@Lee-Jungwoo
Lee-Jungwoo deleted the feat/#108-community-response branch August 3, 2026 15:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 90 to 106
@@ -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)
);
@Lee-Jungwoo
Lee-Jungwoo restored the feat/#108-community-response branch August 3, 2026 15:42
@woo6629058
woo6629058 deleted the feat/#108-community-response branch August 17, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 새로운 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants