Skip to content

Commit

Permalink
Merge pull request #22 from lotteon2/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
CessnaJ authored Jan 13, 2024
2 parents 20c8f33 + 3ac7f2a commit 28f34dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ private static String generateLinkUrl(NotificationType notificationType, Map<Str
case ORDER_SHIPPED:
case ORDER_ARRIVED:
case ORDER_CANCELED:
return baseUrl + "/my-page/order-history";
return baseUrl + "/order-history";
case GIFT_RECEIVED:
return baseUrl + "/my-page/gifts";
return baseUrl + "/gifts";
case POINTS_EARNED_SNS:
return baseUrl + "/my-page/point-history";
return baseUrl + "/point-history";
case AUCTION_END:
return "";
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,18 @@ public void consumeGiftReceivedNotificationCheckQueue(
SQSNotificationDto sqsNotificationDto = objectMapper.readValue(message, SQSNotificationDto.class);
RawNotificationData rawNotificationData = sqsNotificationDto.getRawNotificationData();
NotificationData notificationData = NotificationData.fromRawData(rawNotificationData); // rawNotificationData -> 데이터 가공
// log.info(sqsNotificationDto.toString());
// log.info(rawNotificationData.toString());
// log.info(notificationData.toString());
log.info("가공한 데이터를 이제 보여줍니다.");
log.info(sqsNotificationDto.toString());
log.info(rawNotificationData.toString());
log.info(notificationData.toString());

List<Long> existingMemberIds = sqsNotificationDto.getWhoToNotify();
Mono<List<Long>> memberIdsMono = notificationUtils.determineMemberIds( // 알림 수신대상 존재 여부에 따라 가공
rawNotificationData.getNotificationType(),
rawNotificationData.getParameters(),
existingMemberIds);
// log.info(existingMemberIds.toString());
// log.info(memberIdsMono.toString());
log.info("원래 정해준 id" + existingMemberIds.toString());
log.info("로직 걸쳐서 바뀐 id" + memberIdsMono.toString());

memberIdsMono
.flatMap(memberIds -> sseNotificationService.onNotificationReceived(notificationData, memberIds))
Expand Down Expand Up @@ -301,7 +302,7 @@ public void consumePointsEarnedBySNSNotificationCheckQueue(
@SqsListener(
value = "user-created-queue",
deletionPolicy = SqsMessageDeletionPolicy.NEVER)
public void consumeFirstLoginCheckQueue(
public void consumeUserCreatedCheckQueue(
@Payload String message, @Headers Map<String, String> headers, Acknowledgment ack)
throws JsonProcessingException {
try {
Expand Down

0 comments on commit 28f34dc

Please sign in to comment.