From c5b22ae1f24ffba94f1a9a588efbe973e72c0dbc Mon Sep 17 00:00:00 2001 From: dl-00-e8 Date: Sat, 18 May 2024 17:06:36 +0900 Subject: [PATCH] =?UTF-8?q?[#128]=20fix:=20=EC=BF=BC=EB=A6=AC=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/domain/post/service/PostService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gongjakso/server/domain/post/service/PostService.java b/src/main/java/com/gongjakso/server/domain/post/service/PostService.java index e11a2156..5e0da741 100644 --- a/src/main/java/com/gongjakso/server/domain/post/service/PostService.java +++ b/src/main/java/com/gongjakso/server/domain/post/service/PostService.java @@ -371,7 +371,7 @@ public GetPostRelation checkPostRelation(Member member, Long postId) { @Transactional public Page getMyScrapProject(Member member, Pageable page){ - Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by(Sort.Direction.DESC, "created_at")); + Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by("createdAt").descending()); Page scrapPageList = postScrapRepository.findAllByMemberAndScrapStatusTrueOrderByPostScrapIdDesc(member, pageable); @@ -398,7 +398,7 @@ public Page getMyScrapProject(Member member, Pageable page){ @Transactional public Page getMyScrapContest(Member member, Pageable page){ - Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by(Sort.Direction.DESC, "created_at")); + Pageable pageable = PageRequest.of(page.getPageNumber(), page.getPageSize(), Sort.by("createdAt").descending()); Page scrapPageList = postScrapRepository.findAllByMemberAndScrapStatusTrueOrderByPostScrapIdDesc(member, pageable); @@ -422,4 +422,9 @@ public Page getMyScrapContest(Member member, Pageable page){ // 필터링된 리스트를 페이지로 반환 return new PageImpl<>(filteredContests, pageable, scrapPageList.getTotalElements()); } + +// @Transactional +// public ? completePost() { +// +// } } \ No newline at end of file