Skip to content

Commit

Permalink
!HOTFIX: 프로젝트 조회시 기수 별 내림차순으로 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnnoh committed Aug 16, 2024
1 parent fe6ba36 commit 5d603e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -9,6 +8,6 @@

public interface PortfolioRepository extends JpaRepository<Portfolio, Long> {
List<Portfolio> findAllByGenerationAndScope(Long generation, ProjectScope scope);
List<Portfolio> findAllByScope(ProjectScope scope);
List<Portfolio> findAllByScopeOrderByGenerationDesc(ProjectScope scope);
Portfolio findByPortfolioId(Long portfolioId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public PortfolioResponse one(Long portfolioId) {
}

private List<PortfoliosResponse> getPortfoliosByScope(ProjectScope scope) {
return portfolioRepository.findAllByScope(scope).stream()
return portfolioRepository.findAllByScopeOrderByGenerationDesc(scope).stream()
.map(portfolioMapper::mappingPortfolioToPortfoliosResponse)
.toList();
}
Expand Down

0 comments on commit 5d603e5

Please sign in to comment.