From b96737ed38218e6dd74269d21ba5e9d53e234f78 Mon Sep 17 00:00:00 2001 From: imenuuu Date: Wed, 9 Oct 2024 01:07:02 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20country=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20null=20=EA=B0=92=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wineyapi/tastingNote/convertor/TastingNoteConvertor.java | 3 ++- .../example/wineyapi/tastingNote/dto/TastingNoteResponse.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java b/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java index c095886..33d34dd 100644 --- a/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java +++ b/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java @@ -309,6 +309,7 @@ public TastingNoteResponse.TastingNoteDTO toTastingNote(TastingNote tastingNote, .wineType(wine.getType()) .wineName(wine.getName()) .region(wine.getRegion()) + .country(wine.getCountry()) .vintage(tastingNote.getVintage()) .star(tastingNote.getStarRating() != null ? tastingNote.getStarRating() : null) .color(tastingNote.getColor()) @@ -354,7 +355,7 @@ private TastingNoteResponse.MyWineTaste MyWineTaste(TastingNote tastingNote) { .builder() .sweetness(tastingNote.getSweetness()) .acidity(tastingNote.getAcidity()) - .alcohol(tastingNote.getAlcohol()) + .alcohol(tastingNote.getAlcohol() != null ? Double.valueOf(tastingNote.getAlcohol()) : 0) .body(tastingNote.getBody()) .tannin(tastingNote.getTannins()) .sparkling(tastingNote.getSparkling() != null ? Double.valueOf(tastingNote.getSparkling()) : 0) diff --git a/Winey-API/src/main/java/com/example/wineyapi/tastingNote/dto/TastingNoteResponse.java b/Winey-API/src/main/java/com/example/wineyapi/tastingNote/dto/TastingNoteResponse.java index 2068a81..dceae36 100644 --- a/Winey-API/src/main/java/com/example/wineyapi/tastingNote/dto/TastingNoteResponse.java +++ b/Winey-API/src/main/java/com/example/wineyapi/tastingNote/dto/TastingNoteResponse.java @@ -90,6 +90,9 @@ public static class TastingNoteDTO { @Schema(description = "와인 생상지") private String region; + @Schema(description = "와인 생산지") + private Country country; + @Schema(description = "별점") private Integer star;