Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
choidongkuen committed Oct 10, 2023
2 parents 554c3a6 + 15bc808 commit 3f35bb2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@AllArgsConstructor
@NoArgsConstructor
public class FcmNotificationRequestDto {
private Long acId; // 추가된 acId 필드
private String targetUserPhoneNumber;
private String title;
private String body;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@AllArgsConstructor
@NoArgsConstructor
public class FcmNotificationRequestListDto {
private Long acId;
private List<String> targetUserPhoneNumber;
private String title;
private String body;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 으로
Expand Down Expand Up @@ -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<String> validUserPhoneNumber, List<String> invalidUserPhoneNumber, Long acId, List<String> targetUserPhoneNumber) {
private FcmNotificationResponseDto buildResponse(List<String> validUserPhoneNumber, List<String> invalidUserPhoneNumber, List<String> targetUserPhoneNumber) {
FcmNotificationResponseDto responseDto = new FcmNotificationResponseDto();

if (validUserPhoneNumber.isEmpty()) {
Expand All @@ -93,9 +93,6 @@ private FcmNotificationResponseDto buildResponse(List<String> validUserPhoneNumb
log.info("유효하지 않은 유저 수: {}", invalidUserPhoneNumber.size());
responseDto.setResponseMessage("알림을 성공적으로 전달하였습니다. 유효한 유저 수: " + validUserPhoneNumber.size());
}

responseDto.setAcId(acId); // ACID 설정

return responseDto;
}

Expand Down

0 comments on commit 3f35bb2

Please sign in to comment.