diff --git a/onedayhero-api/src/main/resources/static/docs/index.html b/onedayhero-api/src/main/resources/static/docs/index.html index e23c50c0..ae723e34 100644 --- a/onedayhero-api/src/main/resources/static/docs/index.html +++ b/onedayhero-api/src/main/resources/static/docs/index.html @@ -606,7 +606,7 @@

HTTP Response
HTTP/1.1 201 Created
-Set-Cookie: refreshToken=3268b2da-48db-4c0d-9a91-e04131919e19; HttpOnly
+Set-Cookie: refreshToken=dcceb6c1-7177-4a1d-9041-c808b0ab1e23; HttpOnly
 Location:
 Content-Type: application/json;charset=UTF-8
 Content-Length: 134
@@ -617,7 +617,7 @@ 

HTTP Response "userId" : 1, "accessToken" : "accessToken" }, - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:36" }

@@ -733,7 +733,7 @@

HTTP Response
@@ -885,7 +885,7 @@

HTTP Response "heroScore" : 30, "isHeroMode" : false }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -1205,7 +1205,7 @@

HTTP Response "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -1323,7 +1323,7 @@

HTTP Response { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -1525,7 +1525,7 @@

HTTP Response "empty" : false } }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -1903,7 +1903,7 @@

HTTP Response "starScore" : 3, "senderNickname" : "리뷰 작성자 닉네임", "profileImage" : [ "s3 프로필 이미지 주소" ], - "createdAt" : "2023-11-30T13:15:25" + "createdAt" : "2023-11-30T14:05:38" }, { "reviewId" : 2, "categoryName" : "청소", @@ -1911,7 +1911,7 @@

HTTP Response "starScore" : 4, "senderNickname" : "리뷰 작성자 닉네임", "profileImage" : [ "s3 프로필 이미지 주소" ], - "createdAt" : "2023-11-30T13:15:25" + "createdAt" : "2023-11-30T14:05:38" } ], "pageable" : { "pageNumber" : 0, @@ -1937,7 +1937,7 @@

HTTP Response "numberOfElements" : 2, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -2253,7 +2253,7 @@

HTTP Response "categoryName" : "청소", "missionTitle" : "청소 미션", "starScore" : 4, - "createdAt" : "2023-11-30T13:15:25" + "createdAt" : "2023-11-30T14:05:38" }, { "reviewId" : 2, "senderId" : 8, @@ -2262,7 +2262,7 @@

HTTP Response "categoryName" : "심부름", "missionTitle" : "심부름 미션", "starScore" : 3, - "createdAt" : "2023-11-30T13:15:25" + "createdAt" : "2023-11-30T14:05:38" } ], "pageable" : { "pageNumber" : 0, @@ -2288,7 +2288,7 @@

HTTP Response "numberOfElements" : 2, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -2578,7 +2578,7 @@

HTTP Response "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -2679,7 +2679,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -2796,7 +2796,7 @@

HTTP Respon }, "heroScore" : 60 }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -2988,7 +2988,7 @@

HTTP Respon } ], "heroScore" : 60 }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -3292,7 +3292,7 @@

HTTP Respon "numberOfElements" : 3, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -3696,7 +3696,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -3849,7 +3849,7 @@

Http Respon } ], "isBookmarked" : true }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -4263,7 +4263,7 @@

Http Respon "numberOfElements" : 2, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -4725,7 +4725,7 @@

Http Respon "numberOfElements" : 1, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -5096,7 +5096,7 @@

Http Respon "numberOfElements" : 1, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -5474,7 +5474,7 @@

Http Respon "isBookmarked" : true } ] }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -5822,7 +5822,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -5998,7 +5998,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -6115,7 +6115,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -6233,7 +6233,7 @@

HTTP Respon { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -6426,7 +6426,7 @@

Http Respon "numberOfElements" : 2, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -6803,7 +6803,7 @@

HTTP Respon { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -6937,7 +6937,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -7071,7 +7071,7 @@

HTTP Respon { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -7169,7 +7169,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -7305,7 +7305,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -7455,7 +7455,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -7574,7 +7574,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -7674,7 +7674,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -7807,7 +7807,7 @@

HTTP Respon "status" : "MATCHING", "bookmarkCount" : 5, "isBookmarked" : true, - "createdAt" : "2023-11-30T13:15:24", + "createdAt" : "2023-11-30T14:05:37", "region" : { "si" : "서울시", "gu" : "프로구", @@ -7834,7 +7834,7 @@

HTTP Respon "status" : "MATCHING", "bookmarkCount" : 5, "isBookmarked" : true, - "createdAt" : "2023-11-29T13:15:24", + "createdAt" : "2023-11-29T14:05:37", "region" : { "si" : "서울시", "gu" : "프로구", @@ -7861,7 +7861,7 @@

HTTP Respon "status" : "MATCHING_COMPLETED", "bookmarkCount" : 5, "isBookmarked" : true, - "createdAt" : "2023-11-27T13:15:24", + "createdAt" : "2023-11-27T14:05:37", "region" : { "si" : "서울시", "gu" : "프로구", @@ -7888,7 +7888,7 @@

HTTP Respon "status" : "MISSION_COMPLETED", "bookmarkCount" : 5, "isBookmarked" : true, - "createdAt" : "2023-11-28T13:15:24", + "createdAt" : "2023-11-28T14:05:37", "region" : { "si" : "서울시", "gu" : "프로구", @@ -7915,7 +7915,7 @@

HTTP Respon "status" : "EXPIRED", "bookmarkCount" : 5, "isBookmarked" : true, - "createdAt" : "2023-11-27T13:15:24", + "createdAt" : "2023-11-27T14:05:37", "region" : { "si" : "서울시", "gu" : "프로구", @@ -7959,7 +7959,7 @@

HTTP Respon "numberOfElements" : 5, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } @@ -8404,7 +8404,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -8526,7 +8526,7 @@

HTTP Respon "data" : { "id" : 1 }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -8648,9 +8648,9 @@

HTTP Respon "uniqueName" : "B", "path" : "S3 이미지 주소B" } ], - "createdAt" : "2023-11-30T13:15:24" + "createdAt" : "2023-11-30T14:05:38" }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -8861,7 +8861,7 @@

HTTP Respon { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -8945,7 +8945,7 @@

HTTP Respon "categoryName" : "청소", "missionTitle" : "청소 미션", "starScore" : 4, - "createdAt" : "2023-11-30T13:15:24" + "createdAt" : "2023-11-30T14:05:38" }, { "reviewId" : 2, "senderId" : 8, @@ -8954,7 +8954,7 @@

HTTP Respon "categoryName" : "심부름", "missionTitle" : "심부름 미션", "starScore" : 3, - "createdAt" : "2023-11-30T13:15:24" + "createdAt" : "2023-11-30T14:05:38" } ], "pageable" : { "pageNumber" : 0, @@ -8980,7 +8980,7 @@

HTTP Respon "numberOfElements" : 2, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -9287,7 +9287,7 @@

HTTP Respon { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:25" + "serverDateTime" : "2023-11-30T14:05:38" } @@ -9467,7 +9467,7 @@

HTTP Respon "isBookmarked" : false } ] }, - "serverDateTime" : "2023-11-30T13:15:23" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -9804,22 +9804,22 @@

HTTP Respon "status" : 200, "data" : { "content" : [ { - "id" : "4e6cf311-ca78-49c9-839e-b1adc38d88df", + "id" : "fbdd4f6a-dc1b-451c-847e-aaa2628fc0c7", "title" : "알림 제목", "content" : "알림 내용", "createdAt" : "2023-11-21T12:00:00" }, { - "id" : "94067915-d431-45a3-9950-dbf1144cf411", + "id" : "08bf6030-108d-45fc-9db5-480525efdde5", "title" : "알림 제목", "content" : "알림 내용", "createdAt" : "2023-11-21T10:00:00" }, { - "id" : "837d9895-0688-4a3d-8f46-d7986a515de5", + "id" : "e6491b23-8c9a-4173-aaa8-38dd8665e953", "title" : "알림 제목", "content" : "알림 내용", "createdAt" : "2023-11-20T12:00:00" }, { - "id" : "ea24b561-8a48-410b-abb5-39357681e543", + "id" : "78363a9e-2550-4c6d-b73d-732cca27ef90", "title" : "알림 제목", "content" : "알림 내용", "createdAt" : "2023-11-14T12:00:00" @@ -9848,7 +9848,7 @@

HTTP Respon "numberOfElements" : 4, "empty" : false }, - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:35" } @@ -10072,7 +10072,7 @@

알림 삭제

HTTP Request

-
DELETE /api/v1/alarms/56cb3c2b-9673-442f-a1d9-222270d59e6a HTTP/1.1
+
DELETE /api/v1/alarms/bb6e71e7-7549-42f0-910d-cbb45b20c188 HTTP/1.1
 Content-Type: application/json;charset=UTF-8
 Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicm9sZSI6Ik1FTUJFUiIsImlhdCI6MTY5OTk0MDA5NiwiZXhwIjoxNzU5OTQwMDk2fQ.7xyZyQIzbkp-FLxNOLXpSI3Yg0CZ8tAJvlHrgATzZB4
 Host: localhost:8080
@@ -10127,7 +10127,7 @@

HTTP Respon { "status" : 204, "data" : null, - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:35" }

@@ -10254,7 +10254,7 @@

HTTP Respon "missionId" : 1, "headCount" : 2 }, - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -10389,7 +10389,7 @@

HTTP Respon "headCount" : 2, "lastSentMessageTime" : "2023-11-12T12:00:00" } ], - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -10580,7 +10580,7 @@

HTTP Respon "message" : "안녕하세요! 미션 내용 확인하고자합니다!", "sentMessageTime" : "2023-11-26T19:27:00" } ], - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -10705,7 +10705,7 @@

HTTP Respon "userId" : 1, "missionId" : 1 }, - "serverDateTime" : "2023-11-30T13:15:22" + "serverDateTime" : "2023-11-30T14:05:36" } @@ -10825,7 +10825,7 @@

HTTP Respon } ] } ] } ], - "serverDateTime" : "2023-11-30T13:15:24" + "serverDateTime" : "2023-11-30T14:05:37" } diff --git a/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomService.java b/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomService.java index d8e383f9..6705da08 100644 --- a/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomService.java +++ b/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomService.java @@ -31,6 +31,7 @@ public class ChatRoomService { private static final int MAX_CAPACITY = 2; + private final MissionChatRoomValidator missionChatRoomValidator; private final MissionChatRoomReader missionChatRoomReader; private final MissionChatRoomRepository missionChatRoomRepository; private final UserMissionChatRoomRepository userMissionChatRoomRepository; @@ -42,7 +43,9 @@ public class ChatRoomService { public MissionChatRoomCreateResponse createChatRoom( CreateMissionChatRoomServiceRequest request ) { + missionChatRoomValidator.duplicateMissionChatRoom(request.userIds(), request.missionId()); var missionChatRoom = MissionChatRoom.createMissionChatRoom(request.missionId(), request.userIds()); + var savedMissionChatRoom = missionChatRoomRepository.save(missionChatRoom); missionChatRoomRedisRepository.create(MissionChatRoomRedisRequest.from(missionChatRoom)); diff --git a/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/MissionChatRoomValidator.java b/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/MissionChatRoomValidator.java new file mode 100644 index 00000000..f0fcab9f --- /dev/null +++ b/onedayhero-application/src/main/java/com/sixheroes/onedayheroapplication/chatroom/MissionChatRoomValidator.java @@ -0,0 +1,28 @@ +package com.sixheroes.onedayheroapplication.chatroom; + +import com.sixheroes.onedayherocommon.error.ErrorCode; +import com.sixheroes.onedayherocommon.exception.BusinessException; +import com.sixheroes.onedayherodomain.missionchatroom.repository.UserMissionChatRoomRepository; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Slf4j +@RequiredArgsConstructor +@Component +public class MissionChatRoomValidator { + + private final UserMissionChatRoomRepository userMissionChatRoomRepository; + + public void duplicateMissionChatRoom( + List userIds, + Long missionId + ) { + if (userMissionChatRoomRepository.findByUserIdInAndMissionChatRoom_MissionId(userIds, missionId).size() == 2) { + log.warn("이미 존재하는 채팅방입니다. userId : {}, missionId : {}", userIds, missionId); + throw new BusinessException(ErrorCode.DUPLICATE_MISSION_CHATROOM); + } + } +} diff --git a/onedayhero-application/src/test/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomServiceTest.java b/onedayhero-application/src/test/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomServiceTest.java index f5d5594a..96fc1697 100644 --- a/onedayhero-application/src/test/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomServiceTest.java +++ b/onedayhero-application/src/test/java/com/sixheroes/onedayheroapplication/chatroom/ChatRoomServiceTest.java @@ -3,6 +3,7 @@ import com.sixheroes.onedayheroapplication.IntegrationApplicationTest; import com.sixheroes.onedayheroapplication.chatroom.request.CreateMissionChatRoomServiceRequest; import com.sixheroes.onedayherochat.application.repository.request.MissionChatRoomRedisRequest; +import com.sixheroes.onedayherocommon.exception.BusinessException; import com.sixheroes.onedayherodomain.mission.Mission; import com.sixheroes.onedayherodomain.mission.MissionInfo; import com.sixheroes.onedayherodomain.mission.MissionStatus; @@ -19,8 +20,7 @@ import java.util.List; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.tuple; +import static org.assertj.core.api.Assertions.*; import static org.mockito.ArgumentMatchers.anyList; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.any; @@ -53,6 +53,31 @@ void createChatRoom() { assertThat(chatRoom.missionId()).isEqualTo(missionId); } + @DisplayName("유저는 동일한 채팅방을 생성 할 수 없다.") + @Test + void createChatRoomWithDuplicate() { + // given + var missionId = 1L; + var userIds = List.of(1L, 2L); + + var request = CreateMissionChatRoomServiceRequest.builder() + .missionId(missionId) + .userIds(userIds) + .build(); + + var missionChatRoom = MissionChatRoom.createMissionChatRoom(request.missionId(), request.userIds()); + var redisRequest = MissionChatRoomRedisRequest.from(missionChatRoom); + + given(missionChatRoomRedisRepository.create(any(MissionChatRoomRedisRequest.class))) + .willReturn(redisRequest); + + chatRoomService.createChatRoom(request); + + // when & then + assertThatThrownBy(() -> chatRoomService.createChatRoom(request)) + .isInstanceOf(BusinessException.class); + } + @DisplayName("유저가 둘 다 나가있지 않은 상태에서 채팅방을 나갈 수 있다.") @Test void exitChatRoomWithMaxConnection() { diff --git a/onedayhero-common/src/main/java/com/sixheroes/onedayherocommon/error/ErrorCode.java b/onedayhero-common/src/main/java/com/sixheroes/onedayherocommon/error/ErrorCode.java index 35440420..9de017fb 100644 --- a/onedayhero-common/src/main/java/com/sixheroes/onedayherocommon/error/ErrorCode.java +++ b/onedayhero-common/src/main/java/com/sixheroes/onedayherocommon/error/ErrorCode.java @@ -94,8 +94,7 @@ public enum ErrorCode { ABORT_CHATROOM_EXIT("MCR_001", "채팅방에 입장한 상태에서만 채팅방 나가기가 가능합니다."), INVALID_CREATE_CHAT("MCR_002", "채팅방을 생성하기 위한 적절한 인원이 들어오지 않았습니다."), NOT_FOUND_CHAT_TOPIC("MCR_003", "저장되어있는 레디스 채팅 토픽을 찾지 못했습니다."), - - // USER_MISSION_CHATROOM + DUPLICATE_MISSION_CHATROOM("MCR_004", "이미 생성되어 있는 채팅방입니다."), // CHAT NOT_FOUND_CHAT_TYPE("CC_000", "존재하지 않는 채팅타입입니다."), diff --git a/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/UserMissionChatRoom.java b/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/UserMissionChatRoom.java index 3fdf612d..678ce0a3 100644 --- a/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/UserMissionChatRoom.java +++ b/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/UserMissionChatRoom.java @@ -13,7 +13,10 @@ @Slf4j @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) -@Table(name = "user_mission_chat_rooms") +@Table(name = "user_mission_chat_rooms", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"mission_chat_room_id", "user_id"}) + }) @Entity public class UserMissionChatRoom extends BaseEntity { diff --git a/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/repository/UserMissionChatRoomRepository.java b/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/repository/UserMissionChatRoomRepository.java index b33c899b..0f91e206 100644 --- a/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/repository/UserMissionChatRoomRepository.java +++ b/onedayhero-domain/src/main/java/com/sixheroes/onedayherodomain/missionchatroom/repository/UserMissionChatRoomRepository.java @@ -28,4 +28,6 @@ public interface UserMissionChatRoomRepository extends JpaRepository findReceiverChatRoomInfoInChatRoomIdsAndUserId(List chatRoomIds, Long userId); List findByUserIdAndIsJoinedTrue(Long userId); + + List findByUserIdInAndMissionChatRoom_MissionId(List userIds, Long missionId); } \ No newline at end of file