Skip to content

Commit

Permalink
[merge] 최신순 로직 변경 - #174
Browse files Browse the repository at this point in the history
[FEAT] 최신순 로직 변경 - #174
  • Loading branch information
rlarlgnszx authored Jul 18, 2024
2 parents 48fa8fc + a91ff67 commit ba9e0d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PointService {
private final PointRepository pointRepository;

public PointGetAllRes getAllPoints(Long userId) {
List<PointDto> points = pointRepository.findAllByUserId(userId)
List<PointDto> points = pointRepository.findAllByUserIdOrderByCreatedAtDesc(userId)
.stream().map(PointDto::of)
.toList();
PointsDto gainedPoints = pointTypeCheckToList(points, TransactionType.POINT_GAINED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

@Repository
public interface PointRepository extends JpaRepository<Point, Long> {
List<Point> findAllByUserId(Long userId);
List<Point> findAllByUserIdOrderByCreatedAtDesc(Long userId);
}

0 comments on commit ba9e0d2

Please sign in to comment.