diff --git a/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java b/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java index bc697c3b..ccf856e4 100644 --- a/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java +++ b/backend/src/main/java/com/twtw/backend/domain/group/entity/GroupMember.java @@ -62,7 +62,7 @@ public class GroupMember implements Auditable { public GroupMember(Group group, Member member) { this.group = group; this.member = member; - this.isShare = true; + this.isShare = false; member.addGroupMember(this); this.groupInviteCode = GroupInviteCode.REQUESTED; } diff --git a/backend/src/main/java/com/twtw/backend/domain/group/mapper/GroupMapper.java b/backend/src/main/java/com/twtw/backend/domain/group/mapper/GroupMapper.java index 14dd823a..7f656e10 100644 --- a/backend/src/main/java/com/twtw/backend/domain/group/mapper/GroupMapper.java +++ b/backend/src/main/java/com/twtw/backend/domain/group/mapper/GroupMapper.java @@ -17,18 +17,17 @@ public interface GroupMapper { @Mapping(target = "groupImage", source = "groupDto.groupImage") Group toGroupEntity(MakeGroupRequest groupDto, Member leader); - @Named("groupMemberToMemberResponse") @Mapping(target = "memberId", source = "groupMember.member.id") @Mapping(target = "nickname", source = "groupMember.member.nickname") @Mapping(target = "profileImage", source = "groupMember.member.profileImage") @Mapping(target = "isShare", source = "groupMember.isShare") GroupMemberResponse toGroupMemberResponse(GroupMember groupMember); - @Named("groupMemberToMemberResponseList") - @IterableMapping(qualifiedByName = "groupMemberToMemberResponse") + @IterableMapping(elementTargetType = GroupMemberResponse.class) List toGroupMemberResponseList(List groupMemberList); @Mapping(target = "groupId", source = "group.id") + @Mapping(target = "groupMembers", source = "groupMembers") GroupInfoResponse toGroupInfo(Group group, List groupMembers); @Named("groupMemberToGroupInfoResponse") diff --git a/backend/src/main/java/com/twtw/backend/global/constant/RabbitMQConstant.java b/backend/src/main/java/com/twtw/backend/global/constant/RabbitMQConstant.java index d2305c32..6c9dbc4c 100644 --- a/backend/src/main/java/com/twtw/backend/global/constant/RabbitMQConstant.java +++ b/backend/src/main/java/com/twtw/backend/global/constant/RabbitMQConstant.java @@ -6,7 +6,7 @@ @Getter @RequiredArgsConstructor public enum RabbitMQConstant { - LOCATION_QUEUE("map.queue"), + LOCATION_QUEUE("map.queue.*"), LOCATION_EXCHANGE("map"), LOCATION_ROUTING_KEY("location.*"), LOCATION_ROUTING_KEY_PREFIX("location."), diff --git a/backend/src/test/java/com/twtw/backend/domain/group/controller/GroupControllerTest.java b/backend/src/test/java/com/twtw/backend/domain/group/controller/GroupControllerTest.java index d82be766..6b18a63d 100644 --- a/backend/src/test/java/com/twtw/backend/domain/group/controller/GroupControllerTest.java +++ b/backend/src/test/java/com/twtw/backend/domain/group/controller/GroupControllerTest.java @@ -1,23 +1,10 @@ package com.twtw.backend.domain.group.controller; -import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentRequest; -import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentResponse; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.BDDMockito.given; -import static org.mockito.BDDMockito.willDoNothing; -import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; -import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - import com.twtw.backend.domain.group.dto.request.*; import com.twtw.backend.domain.group.dto.response.GroupInfoResponse; import com.twtw.backend.domain.group.dto.response.GroupMemberResponse; import com.twtw.backend.domain.group.service.GroupService; import com.twtw.backend.support.docs.RestDocsTest; - import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; @@ -29,6 +16,17 @@ import java.util.List; import java.util.UUID; +import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentRequest; +import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentResponse; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.mockito.BDDMockito.willDoNothing; +import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; +import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + @DisplayName("GroupController의") @WebMvcTest(GroupController.class) class GroupControllerTest extends RestDocsTest { @@ -124,7 +122,7 @@ void joinGroup() throws Exception { "Bearer wefa3fsdczf32.gaoiuergf92.gb5hsa2jgh")); // then - perform.andExpect(status().isNoContent()).andExpect(jsonPath("$.groupId").isString()); + perform.andExpect(status().isNoContent()); // docs perform.andDo(print())