feat: add search module

This commit is contained in:
Tim
2025-07-01 17:52:02 +08:00
parent 93c23dd9df
commit 2fa6af6304
7 changed files with 304 additions and 0 deletions

View File

@@ -15,4 +15,7 @@ public interface PostRepository extends JpaRepository<Post, Long> {
List<Post> findByAuthorAndStatusOrderByCreatedAtDesc(User author, PostStatus status, Pageable pageable);
List<Post> findByCategoryInAndStatus(List<Category> categories, PostStatus status);
List<Post> findByCategoryInAndStatus(List<Category> categories, PostStatus status, Pageable pageable);
List<Post> findByTitleContainingIgnoreCaseOrContentContainingIgnoreCaseAndStatus(String titleKeyword, String contentKeyword, PostStatus status);
List<Post> findByContentContainingIgnoreCaseAndStatus(String keyword, PostStatus status);
List<Post> findByTitleContainingIgnoreCaseAndStatus(String keyword, PostStatus status);
}