Skip to content

Commit

Permalink
fix : 삭제 처리된 게시물은 검색되지 않도록 변경 #77
Browse files Browse the repository at this point in the history
  • Loading branch information
bongsh0112 committed Oct 23, 2023
1 parent 6525cae commit 622d170
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Page<Article> findAllByBoardAndArticleStatusAndCreateAtBetweenOrderByLikeCountDe
"on a.id = ac.article_id " +
"join tbl_user u " +
"on a.created_user_id = u.id " +
"where ac.title like concat('%', :word, '%') or ac.content like concat('%', :word, '%')", nativeQuery = true
"where ac.title like concat('%', :word, '%') or ac.content like concat('%', :word, '%') and a.article_status='PUBLIC'", nativeQuery = true
)
Page<ArticleInterface> retrieveArticleListDown(@Param(value = "word") String word, Pageable pageable);

Expand All @@ -45,7 +45,7 @@ Page<Article> findAllByBoardAndArticleStatusAndCreateAtBetweenOrderByLikeCountDe
"on a.id = ac.article_id " +
"join tbl_user u " +
"on a.created_user_id = u.id " +
"where ac.title like concat('%', :word, '%') or ac.content like concat('%', :word, '%')", nativeQuery = true
"where ac.title like concat('%', :word, '%') or ac.content like concat('%', :word, '%') and a.article_status='PUBLIC'", nativeQuery = true
)
List<ArticleInterface> retrieveAllArticleByWord(@Param(value = "word") String word);
}

0 comments on commit 622d170

Please sign in to comment.