diff --git a/src/main/java/the_monitor/application/dto/ArticleGoogleDto.java b/src/main/java/the_monitor/application/dto/ArticleGoogleDto.java index 30051d1..02da465 100644 --- a/src/main/java/the_monitor/application/dto/ArticleGoogleDto.java +++ b/src/main/java/the_monitor/application/dto/ArticleGoogleDto.java @@ -18,6 +18,7 @@ public class ArticleGoogleDto { private String publisherName; private String publishDate; private String reporterName; + private boolean scrapped; @Builder public ArticleGoogleDto(Long articleId, @@ -27,7 +28,9 @@ public ArticleGoogleDto(Long articleId, String imageUrl, String publisherName, String publishDate, - String reporterName) { + String reporterName, + boolean scrapped) { + this.articleId = articleId; this.title = title; this.body = body; @@ -36,6 +39,7 @@ public ArticleGoogleDto(Long articleId, this.publisherName = publisherName; this.publishDate = publishDate; this.reporterName = reporterName; + this.scrapped = scrapped; } diff --git a/src/main/java/the_monitor/application/dto/request/ReportArticleUpdateOptionsRequest.java b/src/main/java/the_monitor/application/dto/request/ReportArticleUpdateOptionsRequest.java index 824f254..00ac8d4 100644 --- a/src/main/java/the_monitor/application/dto/request/ReportArticleUpdateOptionsRequest.java +++ b/src/main/java/the_monitor/application/dto/request/ReportArticleUpdateOptionsRequest.java @@ -9,16 +9,14 @@ @NoArgsConstructor public class ReportArticleUpdateOptionsRequest { - @JsonProperty("isMedia") - private boolean isMedia; - @JsonProperty("isReporter") - private boolean isReporter; + private boolean media; + private boolean reporter; @Builder - public ReportArticleUpdateOptionsRequest(boolean isMedia, - boolean isReporter) { - this.isMedia = isMedia; - this.isReporter = isReporter; + public ReportArticleUpdateOptionsRequest(boolean media, + boolean reporter) { + this.media = media; + this.reporter = reporter; } diff --git a/src/main/java/the_monitor/application/dto/request/ReportCreateRequest.java b/src/main/java/the_monitor/application/dto/request/ReportCreateRequest.java index bb1b723..c227ee3 100644 --- a/src/main/java/the_monitor/application/dto/request/ReportCreateRequest.java +++ b/src/main/java/the_monitor/application/dto/request/ReportCreateRequest.java @@ -17,12 +17,8 @@ public class ReportCreateRequest { private String reportTitle; private String color; - - @JsonProperty("isMedia") - private boolean isMedia; - - @JsonProperty("isReporter") - private boolean isReporter; + private boolean media; + private boolean reporter; @JsonProperty("articles") private ReportCategoryTypeRequest reportCategoryTypeRequest; @@ -31,14 +27,14 @@ public class ReportCreateRequest { public ReportCreateRequest(String reportTitle, String color, ReportCategoryTypeRequest reportCategoryTypeRequest, - boolean isMedia, - boolean isReporter) { + boolean media, + boolean reporter) { this.reportTitle = reportTitle; this.color = color; this.reportCategoryTypeRequest = reportCategoryTypeRequest; - this.isMedia = isMedia; - this.isReporter = isReporter; + this.media = media; + this.reporter = reporter; } @@ -48,8 +44,8 @@ public Report toEntity(Client client, String logoUrl) { .title(reportTitle) .color(color) .logo(logoUrl) - .isMedia(isMedia) - .isReporter(isReporter) + .media(media) + .reporter(reporter) .build(); } diff --git a/src/main/java/the_monitor/application/dto/response/ReportOptionsResponse.java b/src/main/java/the_monitor/application/dto/response/ReportOptionsResponse.java index ae693f6..721899f 100644 --- a/src/main/java/the_monitor/application/dto/response/ReportOptionsResponse.java +++ b/src/main/java/the_monitor/application/dto/response/ReportOptionsResponse.java @@ -9,17 +9,15 @@ @NoArgsConstructor public class ReportOptionsResponse { - @JsonProperty("isMedia") - private boolean isMedia; - @JsonProperty("isReporter") - private boolean isReporter; + private boolean media; + private boolean reporter; @Builder - public ReportOptionsResponse(boolean isMedia, - boolean isReporter) { + public ReportOptionsResponse(boolean media, + boolean reporter) { - this.isMedia = isMedia; - this.isReporter = isReporter; + this.media = media; + this.reporter = reporter; } diff --git a/src/main/java/the_monitor/application/serviceImpl/ArticleServiceImpl.java b/src/main/java/the_monitor/application/serviceImpl/ArticleServiceImpl.java index 32dd2ad..217adf1 100644 --- a/src/main/java/the_monitor/application/serviceImpl/ArticleServiceImpl.java +++ b/src/main/java/the_monitor/application/serviceImpl/ArticleServiceImpl.java @@ -77,6 +77,7 @@ private void saveArticlesFromGoogle(Keyword keyword) { } + // 클라이언트가 선택한 카테고리의 기사들을 조회 @Override public PageResponse getArticlesByClientAndCategoryType(CategoryType categoryType, int page) { @@ -93,7 +94,7 @@ public PageResponse getArticlesByClientAndCategoryType(Category } - + // 클라이언트가 선택한 키워드의 기사들을 조회 @Override public PageResponse getArticlesByKeyword(CategoryType categoryType, Long keywordId, int page) { @@ -124,6 +125,7 @@ private PageResponse getArticleResponsePageResponse(Page reportCategories, - boolean isMedia, - boolean isReporter) { + boolean media, + boolean reporter) { this.title = title; this.client = client; this.logo = logo; this.color = color; this.reportCategories = reportCategories; - this.isMedia = isMedia; - this.isReporter = isReporter; + this.media = media; + this.reporter = reporter; } @@ -74,9 +74,9 @@ public void updateColor(String color) { this.color = color; } - public void updateReportOptions(boolean isMedia, boolean isReporter) { - this.isMedia = isMedia; - this.isReporter = isReporter; + public void updateReportOptions(boolean media, boolean reporter) { + this.media = media; + this.reporter = reporter; } public void addReportCategories(List reportCategories) {