Skip to content

Commit

Permalink
refactor : 검색 구현 시 필요없는 content DTO에서 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
bongsh0112 committed Oct 24, 2023
1 parent 17ac266 commit 20940c9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ public interface ArticleInterface {
String getNickName();

String getTitle();

String getContent();
int getLikeCount();
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Page<Article> findAllByBoardAndArticleStatusAndCreateAtBetweenOrderByLikeCountDe
);

@Query(
value = "select a.id, u.nick_name as nickName, ac.title,, a.like_count as likeCount " +
value = "select a.id, u.nick_name as nickName, ac.title, a.like_count as likeCount " +
"from tbl_article a " +
"join tbl_article_content ac " +
"on a.id = ac.article_id " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ public class SimpleArticleVo {

private String title;

private String content;

private Integer likeCount;

public static SimpleArticleVo from(ArticleInterface articleInterface) {
return SimpleArticleVo.builder()
.articleId(articleInterface.getId())
.createdUserNickName(articleInterface.getNickName())
.title(articleInterface.getTitle())
.content(articleInterface.getContent())
.likeCount(articleInterface.getLikeCount())
.build();
}
Expand Down

0 comments on commit 20940c9

Please sign in to comment.