From 735660ea098b7211c66e22932b6a01f1cd20cc43 Mon Sep 17 00:00:00 2001 From: bbbang105 <2018111366@dgu.ac.kr> Date: Thu, 6 Jun 2024 13:20:22 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[refactor]=20:=20=EC=B5=9C=EA=B7=BC=20?= =?UTF-8?q?=EB=B0=B1=ED=85=8C=EC=8A=A4=ED=8C=85=20=EA=B2=B0=EA=B3=BC=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20is=5Fsaved=20=EA=B0=92=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/dgu/backend/dto/BackTestingDto.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/org/dgu/backend/dto/BackTestingDto.java b/backend/src/main/java/org/dgu/backend/dto/BackTestingDto.java index b7222e7..abf2931 100644 --- a/backend/src/main/java/org/dgu/backend/dto/BackTestingDto.java +++ b/backend/src/main/java/org/dgu/backend/dto/BackTestingDto.java @@ -113,6 +113,7 @@ public static class BackTestingResponse { private Trading trading; private Performance performance; private List tradingLogs; + private Boolean isSaved; public void addId(UUID portfolioId) { this.portfolioId = portfolioId; @@ -146,11 +147,12 @@ public PerformanceResult toPerformanceResult(Portfolio portfolio) { } public static BackTestingDto.BackTestingResponse of(Portfolio portfolio, TradingResult tradingResult, PerformanceResult performanceResult, List tradingLogs) { - return BackTestingDto.BackTestingResponse.builder() + return BackTestingResponse.builder() .portfolioId(portfolio.getPortfolioId()) .trading(Trading.of(tradingResult)) .performance(Performance.of(performanceResult)) .tradingLogs(TradingLog.ofTradingLogs(tradingLogs)) + .isSaved(portfolio.getIsSaved()) .build(); } } From 3edec4f09ddcea6ebc55fc38b23bebffcd4f1d90 Mon Sep 17 00:00:00 2001 From: bbbang105 <2018111366@dgu.ac.kr> Date: Thu, 6 Jun 2024 13:21:01 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[refactor]=20:=20=EC=A0=84=EC=B2=B4=20?= =?UTF-8?q?=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC=EC=98=A4=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20is=5Fmarked=20=EA=B0=92=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/dgu/backend/dto/PortfolioDto.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/org/dgu/backend/dto/PortfolioDto.java b/backend/src/main/java/org/dgu/backend/dto/PortfolioDto.java index 1347357..e1716be 100644 --- a/backend/src/main/java/org/dgu/backend/dto/PortfolioDto.java +++ b/backend/src/main/java/org/dgu/backend/dto/PortfolioDto.java @@ -26,15 +26,17 @@ public static class PortfolioInfos { private String startDate; private String endDate; private String candleName; - private boolean isTrade; + private Boolean isMarked; + private Boolean isTrade; public static PortfolioDto.PortfolioInfos of(Portfolio portfolio, PortfolioOption portfolioOption, UUID currentPortfolioId) { - return PortfolioDto.PortfolioInfos.builder() + return PortfolioInfos.builder() .portfolioId(portfolio.getPortfolioId()) .title(portfolio.getTitle()) .startDate(String.valueOf(portfolioOption.getStartDate())) .endDate(String.valueOf(portfolioOption.getEndDate())) .candleName(portfolioOption.getCandleName()) + .isMarked(portfolio.getIsMarked()) .isTrade(Objects.equals(portfolio.getPortfolioId(), currentPortfolioId)) .build(); }