-
Notifications
You must be signed in to change notification settings - Fork 0
모임 상세 조회 시 내 정보 보이도록 다시 수정 #210
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,4 +84,15 @@ List<Long> findUserIdsByGroupIdAndStatuses( | |||||||||||||||||||||
| """) | ||||||||||||||||||||||
| List<GroupUserV2> findAttendByGroupIdOrderByJoinedAtAscWithUser(@Param("groupId") Long groupId); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Query(""" | ||||||||||||||||||||||
| select gu | ||||||||||||||||||||||
| from GroupUserV2 gu | ||||||||||||||||||||||
| join fetch gu.user u | ||||||||||||||||||||||
| where gu.group.id = :groupId | ||||||||||||||||||||||
| and (gu.status = team.wego.wegobackend.group.v2.domain.entity.GroupUserV2Status.ATTEND | ||||||||||||||||||||||
| or u.id = :userId) | ||||||||||||||||||||||
| order by gu.joinedAt asc | ||||||||||||||||||||||
| """) | ||||||||||||||||||||||
| List<GroupUserV2> findAttendPlusMeByGroupId(@Param("groupId") Long groupId, | ||||||||||||||||||||||
| @Param("userId") Long userId); | ||||||||||||||||||||||
|
Comment on lines
+96
to
+97
|
||||||||||||||||||||||
| 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); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -140,6 +140,13 @@ Authorization: Bearer {{member1AccessToken}} | |||||
|
|
||||||
| {} | ||||||
|
|
||||||
| ### 3. 승인제 - MEMBER 2 참여 (성공: PENDING) | ||||||
| POST http://localhost:8080/api/v2/groups/{{groupId_approvalTest}}/attend | ||||||
| Content-Type: application/json | ||||||
| Authorization: Bearer {{member2AccessToken}} | ||||||
|
|
||||||
| {} | ||||||
|
|
||||||
| ### 3-1. 예외: 승인제 - MEMBER 1 중복 신청 (이미 PENDING) | ||||||
| POST http://localhost:8080/api/v2/groups/{{groupId_approvalTest}}/attend | ||||||
| Content-Type: application/json | ||||||
|
|
@@ -182,7 +189,7 @@ Authorization: Bearer {{host2AccessToken}} | |||||
|
|
||||||
| ### 7. (선택) 모임 상세 조회 - MEMBER1 토큰으로 내 상태 확인 | ||||||
| GET http://localhost:8080/api/v2/groups/{{groupId_approvalTest}} | ||||||
| Authorization: Bearer {{member1AccessToken}} | ||||||
| Authorization: Bearer {{host2AccessToken}} | ||||||
|
||||||
| Authorization: Bearer {{host2AccessToken}} | |
| Authorization: Bearer {{member1AccessToken}} |
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.
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.