From 10a5074c01a90f6fd5d70b1fd622c9734e4042f1 Mon Sep 17 00:00:00 2001 From: Lee Haewon Date: Thu, 5 Dec 2024 23:01:43 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8F=99=ED=96=89=20=EB=AA=A8=EC=A7=91?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/on/server/domain/chat/application/ChatService.java | 2 +- .../domain/repository/CompanyParticipantRepository.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/on/server/domain/chat/application/ChatService.java b/src/main/java/com/on/server/domain/chat/application/ChatService.java index ea38dbe2..5258c8fd 100644 --- a/src/main/java/com/on/server/domain/chat/application/ChatService.java +++ b/src/main/java/com/on/server/domain/chat/application/ChatService.java @@ -389,7 +389,7 @@ public void completeRecruit(User user, Long roomId) { // 2. companyParticipant status -> participant로 바꾸기 User userParticipant = chattingRoom.getChatUserOne(); - CompanyParticipant companyParticipant = companyParticipantRepository.findByUser(userParticipant); + CompanyParticipant companyParticipant = companyParticipantRepository.findByUserAndCompanyPostId(userParticipant, companyPost.getId()); // 상태 업데이트 companyParticipant.setCompanyParticipantstatus(PARTICIPANT); diff --git a/src/main/java/com/on/server/domain/companyParticipant/domain/repository/CompanyParticipantRepository.java b/src/main/java/com/on/server/domain/companyParticipant/domain/repository/CompanyParticipantRepository.java index 1bbfa6dc..1f8a4451 100644 --- a/src/main/java/com/on/server/domain/companyParticipant/domain/repository/CompanyParticipantRepository.java +++ b/src/main/java/com/on/server/domain/companyParticipant/domain/repository/CompanyParticipantRepository.java @@ -8,5 +8,5 @@ @Repository public interface CompanyParticipantRepository extends JpaRepository { - CompanyParticipant findByUser(User user); + CompanyParticipant findByUserAndCompanyPostId(User userParticipant, Long companyPostId); }