From 0bb2a210992703b976a29ef0d31a78201a40260c Mon Sep 17 00:00:00 2001 From: hs12 Date: Sat, 28 Sep 2024 16:04:17 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20:=20=EC=B1=84=ED=8C=85=20=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80=20=EC=9A=94=EC=B2=AD=20=ED=95=84=EB=93=9C?= =?UTF-8?q?=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dnd/gongmuin/chat/dto/request/ChatMessageRequest.java | 2 +- .../com/dnd/gongmuin/chat/service/ChatMessageService.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java b/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java index 90654923..3fe88baf 100644 --- a/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java +++ b/src/main/java/com/dnd/gongmuin/chat/dto/request/ChatMessageRequest.java @@ -10,6 +10,6 @@ public record ChatMessageRequest( String type, @NotNull(message = "회원 아이디를 입력해주세요.") - Long memberId + Long senderId ) { } diff --git a/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java b/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java index f001e5db..5089b666 100644 --- a/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java +++ b/src/main/java/com/dnd/gongmuin/chat/service/ChatMessageService.java @@ -24,10 +24,10 @@ public ChatMessageResponse saveChatMessage( ChatMessageRequest request, Long chatRoomId ) { - Long memberId = request.memberId(); + Long senderId = request.senderId(); ChatMessage chatMessage = chatMessageRepository.save( - ChatMessageMapper.toChatMessage(request, chatRoomId, memberId)); - log.info("chatRoomId = {}, memberId= {}, chatMessageId= {}", chatRoomId, memberId, chatMessage.getId()); + ChatMessageMapper.toChatMessage(request, chatRoomId, senderId)); + log.info("chatRoomId = {}, senderId= {}, chatMessageId= {}", chatRoomId, senderId, chatMessage.getId()); return ChatMessageMapper.toChatMessageResponse(chatMessage); } }