From e8dad12e89ed3b1961d110ef1f34820ae4bd1d59 Mon Sep 17 00:00:00 2001 From: jinseok Date: Fri, 15 Nov 2024 00:34:34 +0900 Subject: [PATCH] =?UTF-8?q?[fix]:#142=20=ED=8C=8C=EC=9D=BC=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../post/service/PostAdditionalReader.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/ussum/homepage/domain/post/service/PostAdditionalReader.java diff --git a/src/main/java/ussum/homepage/domain/post/service/PostAdditionalReader.java b/src/main/java/ussum/homepage/domain/post/service/PostAdditionalReader.java new file mode 100644 index 0000000..f3d9c2b --- /dev/null +++ b/src/main/java/ussum/homepage/domain/post/service/PostAdditionalReader.java @@ -0,0 +1,21 @@ +package ussum.homepage.domain.post.service; + +import jakarta.transaction.Transactional; +import java.util.List; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import ussum.homepage.domain.post.Post; +import ussum.homepage.domain.post.RightsDetail; +import ussum.homepage.domain.post.RightsDetailRepository; + +@Service +@RequiredArgsConstructor +public class PostAdditionalReader { + private final RightsDetailRepository rightsDetailRepository; + + @Transactional + public List getRightsDetailByPostId(Long postId) { + List rightsDetails = rightsDetailRepository.findAllByPostId(postId); + return rightsDetails; + } +}