Skip to content

Commit

Permalink
✨ [feat] 내가 스크랩한 게시글 조회(미리보기) 정렬기준 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
y2hscmtk committed Aug 3, 2024
1 parent 38f8d91 commit 0796097
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 0 deletions.
Binary file modified .gradle/8.8/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/8.8/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/8.8/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/8.8/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/8.8/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Optional;


public interface ScrapRepository extends JpaRepository<Scrap, Long> {

@Query("SELECT sc FROM Scrap sc JOIN sc.article ac WHERE sc.member = :member ORDER BY ac.createdAt DESC")
Page<Scrap> findByMember(Member member, Pageable pageable);
// 회원이 게시글을 스크랩했는지 유무
boolean existsByMemberAndArticle(Member member, Article article);
Expand Down

0 comments on commit 0796097

Please sign in to comment.