From 5d603e58f247728ed0ce8875059ef934d75c41d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Fri, 16 Aug 2024 14:18:34 +0900 Subject: [PATCH] =?UTF-8?q?!HOTFIX:=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=EC=8B=9C=20=EA=B8=B0=EC=88=98=20=EB=B3=84?= =?UTF-8?q?=20=EB=82=B4=EB=A6=BC=EC=B0=A8=EC=88=9C=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portfolio/domain/repository/PortfolioRepository.java | 3 +-- .../land/leets/domain/portfolio/usecase/GetPortfoliosImpl.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/land/leets/domain/portfolio/domain/repository/PortfolioRepository.java b/src/main/java/land/leets/domain/portfolio/domain/repository/PortfolioRepository.java index 0601db2..e5590d3 100644 --- a/src/main/java/land/leets/domain/portfolio/domain/repository/PortfolioRepository.java +++ b/src/main/java/land/leets/domain/portfolio/domain/repository/PortfolioRepository.java @@ -1,6 +1,5 @@ package land.leets.domain.portfolio.domain.repository; -import land.leets.domain.comment.domain.Comment; import land.leets.domain.portfolio.domain.Portfolio; import land.leets.domain.portfolio.domain.ProjectScope; import org.springframework.data.jpa.repository.JpaRepository; @@ -9,6 +8,6 @@ public interface PortfolioRepository extends JpaRepository { List findAllByGenerationAndScope(Long generation, ProjectScope scope); - List findAllByScope(ProjectScope scope); + List findAllByScopeOrderByGenerationDesc(ProjectScope scope); Portfolio findByPortfolioId(Long portfolioId); } \ No newline at end of file diff --git a/src/main/java/land/leets/domain/portfolio/usecase/GetPortfoliosImpl.java b/src/main/java/land/leets/domain/portfolio/usecase/GetPortfoliosImpl.java index 07abdae..7f23250 100644 --- a/src/main/java/land/leets/domain/portfolio/usecase/GetPortfoliosImpl.java +++ b/src/main/java/land/leets/domain/portfolio/usecase/GetPortfoliosImpl.java @@ -41,7 +41,7 @@ public PortfolioResponse one(Long portfolioId) { } private List getPortfoliosByScope(ProjectScope scope) { - return portfolioRepository.findAllByScope(scope).stream() + return portfolioRepository.findAllByScopeOrderByGenerationDesc(scope).stream() .map(portfolioMapper::mappingPortfolioToPortfoliosResponse) .toList(); }