From b28019e49e7ac47cf0a1beb872231d0d0c52c174 Mon Sep 17 00:00:00 2001 From: nowgnas Date: Wed, 13 Dec 2023 09:02:58 +0900 Subject: [PATCH] :arrow_up: Update dependency --- build.gradle | 2 +- .../notification/entity/NotificationCommand.java | 4 ++-- .../helper/NotificationActionHelper.java | 6 +++--- .../infrastructure/dto/DeliveryNotification.java | 12 ------------ .../infrastructure/dto/NewOrderNotification.java | 11 ----------- .../infrastructure/dto/NewcomerNotification.java | 10 ---------- .../infrastructure/dto/OrderType.java | 15 --------------- .../infrastructure/dto/QuestionRegister.java | 11 ----------- .../message/NotificationSQSListener.java | 8 ++++---- 9 files changed, 10 insertions(+), 69 deletions(-) delete mode 100644 src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/DeliveryNotification.java delete mode 100644 src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewOrderNotification.java delete mode 100644 src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewcomerNotification.java delete mode 100644 src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/OrderType.java delete mode 100644 src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/QuestionRegister.java diff --git a/build.gradle b/build.gradle index f813046..a31a897 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-aws-messaging:2.2.4.RELEASE' implementation 'org.springframework.kafka:spring-kafka' implementation 'software.amazon.awssdk:sns:2.21.37' - implementation 'io.github.lotteon-maven:blooming-blooms-utils:202312121054' + implementation 'io.github.lotteon-maven:blooming-blooms-utils:202312121629' testImplementation 'org.mockito:mockito-core:4.8.0' diff --git a/src/main/java/kr/bb/notification/domain/notification/entity/NotificationCommand.java b/src/main/java/kr/bb/notification/domain/notification/entity/NotificationCommand.java index 9cec646..088f8bd 100644 --- a/src/main/java/kr/bb/notification/domain/notification/entity/NotificationCommand.java +++ b/src/main/java/kr/bb/notification/domain/notification/entity/NotificationCommand.java @@ -4,10 +4,10 @@ import bloomingblooms.domain.notification.NotificationKind; import bloomingblooms.domain.notification.PublishNotificationInformation; import bloomingblooms.domain.notification.Role; +import bloomingblooms.domain.notification.delivery.DeliveryNotification; import bloomingblooms.domain.resale.ResaleNotificationList; import java.util.List; import java.util.stream.Collectors; -import kr.bb.notification.domain.notification.infrastructure.dto.DeliveryNotification; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; @@ -96,7 +96,7 @@ public static List getResaleNotificationData( .getNotificationKind() .getMessage()) .phoneNumber(item.getPhoneNumber()) - .role(restoreNotification.getRole()) + .role(restoreNotification.getPublishInformation().getRole()) .notificationKind( restoreNotification.getPublishInformation().getNotificationKind()) .redirectUrl(restoreNotification.getPublishInformation().getNotificationUrl()) diff --git a/src/main/java/kr/bb/notification/domain/notification/helper/NotificationActionHelper.java b/src/main/java/kr/bb/notification/domain/notification/helper/NotificationActionHelper.java index fc1fb3d..7b1b9a3 100644 --- a/src/main/java/kr/bb/notification/domain/notification/helper/NotificationActionHelper.java +++ b/src/main/java/kr/bb/notification/domain/notification/helper/NotificationActionHelper.java @@ -1,13 +1,13 @@ package kr.bb.notification.domain.notification.helper; import bloomingblooms.domain.notification.NotificationData; +import bloomingblooms.domain.notification.delivery.DeliveryNotification; +import bloomingblooms.domain.notification.neworder.NewOrderNotification; +import bloomingblooms.domain.notification.question.QuestionRegister; import bloomingblooms.domain.resale.ResaleNotificationList; import java.util.List; import kr.bb.notification.domain.notification.application.NotificationCommandService; import kr.bb.notification.domain.notification.entity.NotificationCommand.NotificationInformation; -import kr.bb.notification.domain.notification.infrastructure.dto.DeliveryNotification; -import kr.bb.notification.domain.notification.infrastructure.dto.NewOrderNotification; -import kr.bb.notification.domain.notification.infrastructure.dto.QuestionRegister; import kr.bb.notification.domain.notification.infrastructure.sms.SendSMS; import kr.bb.notification.domain.notification.infrastructure.sse.SendSSE; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/DeliveryNotification.java b/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/DeliveryNotification.java deleted file mode 100644 index 68a3a77..0000000 --- a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/DeliveryNotification.java +++ /dev/null @@ -1,12 +0,0 @@ -package kr.bb.notification.domain.notification.infrastructure.dto; - -import com.amazonaws.services.ec2.model.StartInstancesRequest; -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public class DeliveryNotification { - private Long userId; - private String phoneNumber; -} diff --git a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewOrderNotification.java b/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewOrderNotification.java deleted file mode 100644 index a8e5cd3..0000000 --- a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewOrderNotification.java +++ /dev/null @@ -1,11 +0,0 @@ -package kr.bb.notification.domain.notification.infrastructure.dto; - -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public class NewOrderNotification { - private Long storeId; - private OrderType orderType; -} diff --git a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewcomerNotification.java b/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewcomerNotification.java deleted file mode 100644 index 0a13349..0000000 --- a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/NewcomerNotification.java +++ /dev/null @@ -1,10 +0,0 @@ -package kr.bb.notification.domain.notification.infrastructure.dto; - -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public class NewcomerNotification { - private Long userId; -} diff --git a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/OrderType.java b/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/OrderType.java deleted file mode 100644 index 4638098..0000000 --- a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/OrderType.java +++ /dev/null @@ -1,15 +0,0 @@ -package kr.bb.notification.domain.notification.infrastructure.dto; - -import lombok.Getter; - -@Getter -public enum OrderType { - PICKUP("픽업"), - SUBSCRIBE("구독"), - DELIVERY("배송"); - private final String orderType; - - OrderType(String orderType) { - this.orderType = orderType; - } -} diff --git a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/QuestionRegister.java b/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/QuestionRegister.java deleted file mode 100644 index dd379e8..0000000 --- a/src/main/java/kr/bb/notification/domain/notification/infrastructure/dto/QuestionRegister.java +++ /dev/null @@ -1,11 +0,0 @@ -package kr.bb.notification.domain.notification.infrastructure.dto; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import lombok.Builder; -import lombok.Getter; - -@Getter -@Builder -public class QuestionRegister { - private Long storeId; -} diff --git a/src/main/java/kr/bb/notification/domain/notification/infrastructure/message/NotificationSQSListener.java b/src/main/java/kr/bb/notification/domain/notification/infrastructure/message/NotificationSQSListener.java index b68fdd9..8c20547 100644 --- a/src/main/java/kr/bb/notification/domain/notification/infrastructure/message/NotificationSQSListener.java +++ b/src/main/java/kr/bb/notification/domain/notification/infrastructure/message/NotificationSQSListener.java @@ -2,15 +2,15 @@ import bloomingblooms.domain.notification.NotificationData; import bloomingblooms.domain.notification.Role; +import bloomingblooms.domain.notification.delivery.DeliveryNotification; +import bloomingblooms.domain.notification.newcomer.NewcomerNotification; +import bloomingblooms.domain.notification.neworder.NewOrderNotification; +import bloomingblooms.domain.notification.question.QuestionRegister; import bloomingblooms.domain.resale.ResaleNotificationList; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.Map; import kr.bb.notification.domain.notification.helper.NotificationActionHelper; -import kr.bb.notification.domain.notification.infrastructure.dto.DeliveryNotification; -import kr.bb.notification.domain.notification.infrastructure.dto.NewOrderNotification; -import kr.bb.notification.domain.notification.infrastructure.dto.NewcomerNotification; -import kr.bb.notification.domain.notification.infrastructure.dto.QuestionRegister; import lombok.RequiredArgsConstructor; import org.springframework.cloud.aws.messaging.listener.Acknowledgment; import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy;