Skip to content

모임 상세 조회 시 내 정보 보이도록 다시 수정 #210

Merged
LimdaeIl merged 1 commit intomainfrom
feat/group-detail
Jan 5, 2026
Merged

모임 상세 조회 시 내 정보 보이도록 다시 수정 #210
LimdaeIl merged 1 commit intomainfrom
feat/group-detail

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Jan 5, 2026

📝 Pull Request

📌 PR 종류

해당하는 항목에 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Fix)
  • 문서 수정 (Docs)
  • 코드 리팩터링 (Refactor)
  • 테스트 추가 (Test)
  • 기타 변경 (Chore)

✨ 변경 내용

그룹 사용자 쿼리를 리팩토링하여 참석 사용자와 현재 사용자를 효율적으로 검색합니다.
이를 통해 현재 사용자가 명시적으로 참석으로 표시되지 않더라도 그룹 사용자 목록에 항상 포함되므로, 관련 정보를 표시하여 사용자 경험을 개선합니다.

🔍 관련 이슈

🧪 테스트

변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.

  • 유닛 테스트 추가 / 수정
  • 통합 테스트 검증
  • 수동 테스트 완료

🚨 확인해야 할 사항 (Checklist)

PR을 제출하기 전에 아래 항목들을 확인해주세요.

  • 코드 포매팅 완료
  • 불필요한 파일/코드 제거
  • 로직 검증 완료
  • 프로젝트 빌드 성공
  • 린트/정적 분석 통과 (해당 시)

🙋 기타 참고 사항

리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 그룹 상세 조회 시 참석자 목록에 요청 사용자가 포함되도록 개선되었습니다.
  • 테스트

    • 그룹 참석 승인 관련 테스트 케이스가 추가되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

그룹 사용자 쿼리를 리팩토링하여 참석 사용자와 현재 사용자를 효율적으로 검색합니다.
이를 통해 현재 사용자가 명시적으로 참석으로 표시되지 않더라도 그룹 사용자 목록에 항상 포함되므로, 관련 정보를 표시하여 사용자 경험을 개선합니다.
@LimdaeIl LimdaeIl self-assigned this Jan 5, 2026
Copilot AI review requested due to automatic review settings January 5, 2026 05:04
@LimdaeIl LimdaeIl added the ✨enhancement New feature or request label Jan 5, 2026
@LimdaeIl LimdaeIl moved this from Backlog to In progress in WeGo-Together Backend Jan 5, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

모임 상세 조회 시 비호스트 사용자에 대해 저장소 메서드를 변경했습니다. 기존 findAttendByGroupIdOrderByJoinedAtAscWithUser 호출 대신 새로운 findAttendPlusMeByGroupId 메서드를 사용하여 요청 사용자의 ID를 파라미터로 전달하고, 해당 메서드를 저장소에 추가했습니다.

Changes

Cohort / File(s) 변경 사항
GroupV2Service 로직 변경
src/main/java/team/wego/wegobackend/group/v2/application/service/GroupV2Service.java
GetGroupV2Response 흐름에서 비호스트 사용자 경로: groupUserV2Repository.findAttendByGroupIdOrderByJoinedAtAscWithUser(groupId)groupUserV2Repository.findAttendPlusMeByGroupId(groupId, userId) 변경
GroupUserV2Repository 메서드 추가
src/main/java/team/wego/wegobackend/group/v2/domain/repository/GroupUserV2Repository.java
새 메서드 findAttendPlusMeByGroupId(Long groupId, Long userId) 추가: 상태가 ATTEND이거나 userId가 일치하는 GroupUserV2 레코드를 조회하고 joinedAt 오름차순으로 정렬
HTTP 테스트 업데이트
src/test/http/group/v2/v2-group-attend-approval-required.http
MEMBER2 참여 테스트 단계 추가: POST /api/v2/groups/{{groupId_approvalTest}}/attend 호출 후 그룹 상세 조회 시 host2AccessToken 사용으로 변경

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 모임 상세를 다시 들여다보니,
내 정보가 쏙 들어왔어요!
ATTEND든 아니든 나를 포함해,
저장소 메서드 findAttendPlusMe 하나로
요청자의 마음을 담아냅니다! 🌟

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9bb2ecb and bbb5367.

📒 Files selected for processing (3)
  • src/main/java/team/wego/wegobackend/group/v2/application/service/GroupV2Service.java
  • src/main/java/team/wego/wegobackend/group/v2/domain/repository/GroupUserV2Repository.java
  • src/test/http/group/v2/v2-group-attend-approval-required.http

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 and usage tips.

@LimdaeIl LimdaeIl merged commit 2297e6a into main Jan 5, 2026
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/group-detail branch January 5, 2026 05:04
@github-project-automation github-project-automation bot moved this from In progress to Done in WeGo-Together Backend Jan 5, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modifies the group detail retrieval logic to ensure the current user's information is always visible, even when they are not explicitly marked as attending. The change refactors the group user query to fetch both attending users and the current user efficiently, improving the user experience by displaying relevant information consistently.

Key Changes:

  • Added a new repository method to fetch attending users plus the current user
  • Updated the service layer to use this new query method for non-host users
  • Added test case for a second member's participation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
GroupUserV2Repository.java Added findAttendPlusMeByGroupId method to retrieve attending users plus the current user
GroupV2Service.java Updated group detail retrieval to use the new repository method for non-host users
v2-group-attend-approval-required.http Added test case for member2 participation and updated authorization token in test case 7

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +92 to +93
and (gu.status = team.wego.wegobackend.group.v2.domain.entity.GroupUserV2Status.ATTEND
or u.id = :userId)
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

The query may return duplicate results if a user has ATTEND status AND matches the userId condition. Consider adding DISTINCT to the query or handling duplicates in the service layer.

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +97
List<GroupUserV2> findAttendPlusMeByGroupId(@Param("groupId") Long groupId,
@Param("userId") Long userId);
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

The method name findAttendPlusMeByGroupId doesn't clearly indicate that it may return users with non-ATTEND status. Consider renaming to findAttendingUsersAndCurrentUser or findAttendingUsersIncludingUser for better clarity.

Suggested change
List<GroupUserV2> findAttendPlusMeByGroupId(@Param("groupId") Long groupId,
@Param("userId") Long userId);
List<GroupUserV2> findAttendingUsersAndCurrentUser(@Param("groupId") Long groupId,
@Param("userId") Long userId);
@Deprecated
default List<GroupUserV2> findAttendPlusMeByGroupId(@Param("groupId") Long groupId,
@Param("userId") Long userId) {
return findAttendingUsersAndCurrentUser(groupId, userId);
}

Copilot uses AI. Check for mistakes.
### 7. (선택) 모임 상세 조회 - MEMBER1 토큰으로 내 상태 확인
GET http://localhost:8080/api/v2/groups/{{groupId_approvalTest}}
Authorization: Bearer {{member1AccessToken}}
Authorization: Bearer {{host2AccessToken}}
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

The test description says 'MEMBER1 토큰으로 내 상태 확인' (check my status with MEMBER1 token) but uses host2AccessToken instead. Update the comment to match the actual token being used or revert to member1AccessToken if the comment is correct.

Suggested change
Authorization: Bearer {{host2AccessToken}}
Authorization: Bearer {{member1AccessToken}}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEAT] 모임 상세 조회 시 내 정보 보이도록 다시 수정

1 participant