diff --git a/.gradle/8.8/executionHistory/executionHistory.bin b/.gradle/8.8/executionHistory/executionHistory.bin index 04c34dd..4ee6722 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.bin and b/.gradle/8.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index 649be0e..d8882f6 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.lock and b/.gradle/8.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.8/fileHashes/fileHashes.bin b/.gradle/8.8/fileHashes/fileHashes.bin index 0829fb9..51135a9 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.bin and b/.gradle/8.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index 2ebe347..800fb0b 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.lock and b/.gradle/8.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.8/fileHashes/resourceHashesCache.bin b/.gradle/8.8/fileHashes/resourceHashesCache.bin index 399bb04..980ae37 100644 Binary files a/.gradle/8.8/fileHashes/resourceHashesCache.bin and b/.gradle/8.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 9515fbf..97c9db0 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ArticleDataLoader.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/ArticleDataLoader.class.uniqueId1 deleted file mode 100644 index 6799674..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ArticleDataLoader.class.uniqueId1 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ArticleServiceImpl.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/ArticleServiceImpl.class.uniqueId2 index 85edbb4..176664d 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ArticleServiceImpl.class.uniqueId2 and b/build/tmp/compileJava/compileTransaction/stash-dir/ArticleServiceImpl.class.uniqueId2 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ArticleTagRepository.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/ArticleTagRepository.class.uniqueId0 deleted file mode 100644 index 9179851..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ArticleTagRepository.class.uniqueId0 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ScrapController.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/ScrapController.class.uniqueId0 new file mode 100644 index 0000000..a83099c Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ScrapController.class.uniqueId0 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ScrapRepository.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/ScrapRepository.class.uniqueId1 new file mode 100644 index 0000000..c9a4d95 Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ScrapRepository.class.uniqueId1 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ScrapService.class.uniqueId4 b/build/tmp/compileJava/compileTransaction/stash-dir/ScrapService.class.uniqueId4 new file mode 100644 index 0000000..9211ebe Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ScrapService.class.uniqueId4 differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index 33b2e69..b864c6a 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/main/java/com/winner_cat/domain/scrap/repository/ScrapRepository.java b/src/main/java/com/winner_cat/domain/scrap/repository/ScrapRepository.java index 08b5498..73c5339 100644 --- a/src/main/java/com/winner_cat/domain/scrap/repository/ScrapRepository.java +++ b/src/main/java/com/winner_cat/domain/scrap/repository/ScrapRepository.java @@ -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 { + + @Query("SELECT sc FROM Scrap sc JOIN sc.article ac WHERE sc.member = :member ORDER BY ac.createdAt DESC") Page findByMember(Member member, Pageable pageable); // 회원이 게시글을 스크랩했는지 유무 boolean existsByMemberAndArticle(Member member, Article article);