Skip to content

Commit 5153538

Browse files
committed
fix: createdAt 필요없이 들어간 부분 제거
1 parent 77d227d commit 5153538

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/com/moaguide/domain/ArticleContent/ArticleContentRepository.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ public interface ArticleContentRepository extends JpaRepository<ArticleContent,
1717

1818
// 카테고리별 데이터 가져오기
1919
@Query("SELECT c FROM ArticleContent c WHERE c.categoryId.categoryId = :categoryId AND c.createdAt <= :createdAt ORDER BY c.createdAt DESC")
20-
Page<ArticleContent> findByCategoryId(@Param("categoryId") int categoryId, Pageable pageable,@Param("createAt") Timestamp createdAt);
20+
Page<ArticleContent> findByCategoryId(@Param("categoryId") int categoryId, Pageable pageable,@Param("createdAt") Timestamp createdAt);
2121

2222
// 전체 데이터 가져오기
2323
@Query("SELECT c FROM ArticleContent c WHERE c.createdAt <= :createdAt ORDER BY c.createdAt DESC")
24-
Page<ArticleContent> findAllContent(Pageable pageable,@Param("createAt") Timestamp createdAt);
24+
Page<ArticleContent> findAllContent(Pageable pageable,@Param("createdAt") Timestamp createdAt);
2525

2626
// 타입과 카테고리별 데이터 가져오기
2727
@Query("SELECT c FROM ArticleContent c WHERE c.type = :type AND c.categoryId.categoryId = :categoryId AND c.createdAt <= :createdAt ORDER BY c.createdAt DESC")
28-
Page<ArticleContent> findByTypeAndCategoryId(@Param("type") String type, @Param("categoryId") int categoryId, Pageable pageable,@Param("createAt") Timestamp createdAt);
28+
Page<ArticleContent> findByTypeAndCategoryId(@Param("type") String type, @Param("categoryId") int categoryId, Pageable pageable,@Param("createdAt") Timestamp createdAt);
2929

3030
// 타입별 데이터 가져오기
3131
@Query("SELECT c FROM ArticleContent c WHERE c.type = :type AND c.createdAt <= :createdAt ORDER BY c.createdAt DESC")
32-
Page<ArticleContent> findByTypeContent(@Param("type") String type, Pageable pageable,@Param("createAt") Timestamp createdAt);
32+
Page<ArticleContent> findByTypeContent(@Param("type") String type, Pageable pageable,@Param("createdAt") Timestamp createdAt);
3333

3434
// 최신 기준 데이터 가져오기
3535
@Query(
@@ -42,7 +42,7 @@ public interface ArticleContentRepository extends JpaRepository<ArticleContent,
4242
"WHERE c.createdAt <= :createdAt " +
4343
"ORDER BY c.createdAt DESC"
4444
)
45-
Page<ArticleOverviewDto> findContentsWithCategory(Pageable pageable,@Param("createAt") Timestamp createdAt);
45+
Page<ArticleOverviewDto> findContentsWithCategory(Pageable pageable,@Param("createdAt") Timestamp createdAt);
4646

4747
// 인기 기준 데이터 가져오기
4848
@Query(
@@ -55,7 +55,7 @@ public interface ArticleContentRepository extends JpaRepository<ArticleContent,
5555
"WHERE c.createdAt <= :createdAt " +
5656
"ORDER BY c.views DESC"
5757
)
58-
Page<ArticleOverviewDto> findContentsByViews(Pageable pageable,@Param("createAt") Timestamp createdAt);
58+
Page<ArticleOverviewDto> findContentsByViews(Pageable pageable,@Param("createdAt") Timestamp createdAt);
5959

6060
// 카테고리 필터 추가된 최신 데이터 가져오기
6161
@Query(
@@ -68,7 +68,7 @@ public interface ArticleContentRepository extends JpaRepository<ArticleContent,
6868
"WHERE c.categoryId.categoryId = :categoryId AND c.createdAt <= :createdAt " +
6969
"ORDER BY c.createdAt DESC"
7070
)
71-
Page<ArticleOverviewDto> findByCategory(@Param("categoryId") int categoryId, Pageable pageable,@Param("createAt") Timestamp createdAt);
71+
Page<ArticleOverviewDto> findByCategory(@Param("categoryId") int categoryId, Pageable pageable,@Param("createdAt") Timestamp createdAt);
7272

7373
// 랜덤으로 3개의 관련 아티클 가져오기
7474
@Query(

0 commit comments

Comments
 (0)