From 20940c9b8e04e0ac414a372f03431e0c81b77e5c Mon Sep 17 00:00:00 2001 From: bongsh0112 Date: Wed, 25 Oct 2023 02:33:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20=EA=B2=80=EC=83=89=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84=20=EC=8B=9C=20=ED=95=84=EC=9A=94=EC=97=86=EB=8A=94=20?= =?UTF-8?q?content=20DTO=EC=97=90=EC=84=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HookKiller/server/board/repository/ArticleInterface.java | 2 -- .../HookKiller/server/board/repository/ArticleRepository.java | 2 +- .../java/HookKiller/server/search/dto/SimpleArticleVo.java | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/HookKiller/server/board/repository/ArticleInterface.java b/src/main/java/HookKiller/server/board/repository/ArticleInterface.java index cb5a75c..ca45c0b 100644 --- a/src/main/java/HookKiller/server/board/repository/ArticleInterface.java +++ b/src/main/java/HookKiller/server/board/repository/ArticleInterface.java @@ -6,7 +6,5 @@ public interface ArticleInterface { String getNickName(); String getTitle(); - - String getContent(); int getLikeCount(); } diff --git a/src/main/java/HookKiller/server/board/repository/ArticleRepository.java b/src/main/java/HookKiller/server/board/repository/ArticleRepository.java index 00669d3..43cde28 100644 --- a/src/main/java/HookKiller/server/board/repository/ArticleRepository.java +++ b/src/main/java/HookKiller/server/board/repository/ArticleRepository.java @@ -31,7 +31,7 @@ Page
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 " + diff --git a/src/main/java/HookKiller/server/search/dto/SimpleArticleVo.java b/src/main/java/HookKiller/server/search/dto/SimpleArticleVo.java index 5527412..00e64ac 100644 --- a/src/main/java/HookKiller/server/search/dto/SimpleArticleVo.java +++ b/src/main/java/HookKiller/server/search/dto/SimpleArticleVo.java @@ -20,8 +20,6 @@ public class SimpleArticleVo { private String title; - private String content; - private Integer likeCount; public static SimpleArticleVo from(ArticleInterface articleInterface) { @@ -29,7 +27,6 @@ public static SimpleArticleVo from(ArticleInterface articleInterface) { .articleId(articleInterface.getId()) .createdUserNickName(articleInterface.getNickName()) .title(articleInterface.getTitle()) - .content(articleInterface.getContent()) .likeCount(articleInterface.getLikeCount()) .build(); }