diff --git a/src/main/java/kr/bb/notification/domain/notification/api/NotificationQueryRestController.java b/src/main/java/kr/bb/notification/domain/notification/api/NotificationQueryRestController.java index 9634faf..89f66ed 100644 --- a/src/main/java/kr/bb/notification/domain/notification/api/NotificationQueryRestController.java +++ b/src/main/java/kr/bb/notification/domain/notification/api/NotificationQueryRestController.java @@ -5,11 +5,13 @@ import kr.bb.notification.domain.notification.entity.NotificationCommand; import kr.bb.notification.domain.notification.helper.NotificationQueryActionHelper; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RestController; +@Slf4j @RestController @RequiredArgsConstructor public class NotificationQueryRestController { @@ -18,6 +20,7 @@ public class NotificationQueryRestController { @GetMapping("/customer") public CommonResponse getNotificationsCUSTOMER( @RequestHeader Long userId) { + log.info("userId" + userId); return CommonResponse.success( notificationQueryFacadeHandler.getNotifications(userId, Role.CUSTOMER)); } diff --git a/src/main/java/kr/bb/notification/domain/notification/application/NotificationQueryService.java b/src/main/java/kr/bb/notification/domain/notification/application/NotificationQueryService.java index 8d9cb17..20edcdc 100644 --- a/src/main/java/kr/bb/notification/domain/notification/application/NotificationQueryService.java +++ b/src/main/java/kr/bb/notification/domain/notification/application/NotificationQueryService.java @@ -7,9 +7,10 @@ import kr.bb.notification.domain.notification.entity.NotificationCommand; import kr.bb.notification.domain.notification.repository.MemberNotificationJpaRepository; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - +@Slf4j @Service @RequiredArgsConstructor @Transactional(readOnly = true) @@ -18,6 +19,7 @@ public class NotificationQueryService { @Transactional public NotificationCommand.NotificationList getNotifications(Long userId, Role role) { + List notifications = memberNotificationJpaRepository.findNotifications(userId, role); List notificationsIsRead = diff --git a/src/main/java/kr/bb/notification/domain/notification/helper/NotificationQueryActionHelper.java b/src/main/java/kr/bb/notification/domain/notification/helper/NotificationQueryActionHelper.java index cd36529..f614085 100644 --- a/src/main/java/kr/bb/notification/domain/notification/helper/NotificationQueryActionHelper.java +++ b/src/main/java/kr/bb/notification/domain/notification/helper/NotificationQueryActionHelper.java @@ -4,14 +4,17 @@ import kr.bb.notification.domain.notification.application.NotificationQueryService; import kr.bb.notification.domain.notification.entity.NotificationCommand; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; +@Slf4j @Component @RequiredArgsConstructor public class NotificationQueryActionHelper { private final NotificationQueryService notificationQueryService; public NotificationCommand.NotificationList getNotifications(Long userId, Role role) { + log.info("action handler user id " + userId); return notificationQueryService.getNotifications(userId, role); }