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); }