From 0373272d63be42189548492628a6320e1c99d9a5 Mon Sep 17 00:00:00 2001 From: seongHyun-Min Date: Tue, 10 Oct 2023 22:09:33 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20fcm=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=EB=A9=94=EC=8B=9C=EC=A7=80=20=EC=A0=84=EC=86=A1=20acId=20->=20?= =?UTF-8?q?targetUserPhoneNumber?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/howmuch/dto/fcm/FcmNotificationRequestDto.java | 1 - .../howmuch/dto/fcm/FcmNotificationRequestListDto.java | 1 - .../howmuch/service/fcm/FcmNotificationService.java | 7 ++----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestDto.java b/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestDto.java index 84573a6..ac544cf 100644 --- a/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestDto.java +++ b/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestDto.java @@ -8,7 +8,6 @@ @AllArgsConstructor @NoArgsConstructor public class FcmNotificationRequestDto { - private Long acId; // 추가된 acId 필드 private String targetUserPhoneNumber; private String title; private String body; diff --git a/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestListDto.java b/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestListDto.java index dba6455..297f404 100644 --- a/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestListDto.java +++ b/src/main/java/com/example/howmuch/dto/fcm/FcmNotificationRequestListDto.java @@ -11,7 +11,6 @@ @AllArgsConstructor @NoArgsConstructor public class FcmNotificationRequestListDto { - private Long acId; private List targetUserPhoneNumber; private String title; private String body; diff --git a/src/main/java/com/example/howmuch/service/fcm/FcmNotificationService.java b/src/main/java/com/example/howmuch/service/fcm/FcmNotificationService.java index 43fb19a..7ed20da 100644 --- a/src/main/java/com/example/howmuch/service/fcm/FcmNotificationService.java +++ b/src/main/java/com/example/howmuch/service/fcm/FcmNotificationService.java @@ -35,7 +35,7 @@ public FcmNotificationResponseDto sendNotificationToGroup(FcmNotificationRequest sendNotification(phoneNumber, requestDto.getTitle(), requestDto.getBody(), validUserPhoneNumber, invalidUserPhoneNumber); } - return buildResponse(validUserPhoneNumber, invalidUserPhoneNumber, requestDto.getAcId(), requestDto.getTargetUserPhoneNumber()); + return buildResponse(validUserPhoneNumber, invalidUserPhoneNumber, requestDto.getTargetUserPhoneNumber()); } // 1 대 1 으로 @@ -82,7 +82,7 @@ private void sendNotification(String phoneNumber, String title, String body) { sendNotification(phoneNumber, title, body, new ArrayList<>(), new ArrayList<>()); } - private FcmNotificationResponseDto buildResponse(List validUserPhoneNumber, List invalidUserPhoneNumber, Long acId, List targetUserPhoneNumber) { + private FcmNotificationResponseDto buildResponse(List validUserPhoneNumber, List invalidUserPhoneNumber, List targetUserPhoneNumber) { FcmNotificationResponseDto responseDto = new FcmNotificationResponseDto(); if (validUserPhoneNumber.isEmpty()) { @@ -93,9 +93,6 @@ private FcmNotificationResponseDto buildResponse(List validUserPhoneNumb log.info("유효하지 않은 유저 수: {}", invalidUserPhoneNumber.size()); responseDto.setResponseMessage("알림을 성공적으로 전달하였습니다. 유효한 유저 수: " + validUserPhoneNumber.size()); } - - responseDto.setAcId(acId); // ACID 설정 - return responseDto; }