diff --git a/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseHarmonyDto.java b/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseHarmonyDto.java index 4b03f72..de3a35a 100644 --- a/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseHarmonyDto.java +++ b/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseHarmonyDto.java @@ -19,7 +19,7 @@ public ResponseHarmonyDto(){} public ResponseHarmonyDto(Flower flower) { this.id = flower.getFlowerId(); this.harmonyFlower = flower.getName(); - this.period = flower.getPeriod().toString(); + this.period = String.format("%02d", flower.getPeriod() / 100); this.explain = flower.getExplain(); this.flower_language = flower.getFlowerLanguage(); this.image = flower.getImage(); diff --git a/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseMentDto.java b/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseMentDto.java index 5be25cd..6d6daf8 100644 --- a/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseMentDto.java +++ b/src/main/java/com/example/fiurinee/domain/inputMessage/dto/ResponseMentDto.java @@ -19,7 +19,7 @@ public ResponseMentDto(){} public ResponseMentDto(Flower flower) { this.id = flower.getFlowerId(); this.recommendFlower = flower.getName(); - this.period = flower.getPeriod().toString(); + this.period = String.format("%02d", flower.getPeriod() / 100); this.explain = flower.getExplain(); this.flower_language = flower.getFlowerLanguage(); this.image = flower.getImage(); diff --git a/src/main/java/com/example/fiurinee/domain/matchingFlower/dto/HarmonyRecentDto.java b/src/main/java/com/example/fiurinee/domain/matchingFlower/dto/HarmonyRecentDto.java index 911adc2..42102fb 100644 --- a/src/main/java/com/example/fiurinee/domain/matchingFlower/dto/HarmonyRecentDto.java +++ b/src/main/java/com/example/fiurinee/domain/matchingFlower/dto/HarmonyRecentDto.java @@ -48,7 +48,7 @@ public static List of(Long order, Member member){ Flower flower = matchingFlowers.get(i).getFlower(); harmonyRecentDto.harmonyFlower = flower.getName(); harmonyRecentDto.order = order; - harmonyRecentDto.period = flower.getPeriod().toString(); + harmonyRecentDto.period = String.format("%02d", flower.getPeriod() / 100); harmonyRecentDto.explain = flower.getExplain(); harmonyRecentDto.image = flower.getImage(); harmonyRecentDto.flower_language = flower.getFlowerLanguage(); diff --git a/src/main/java/com/example/fiurinee/domain/recommendFlower/dto/RecommendFlowerDto.java b/src/main/java/com/example/fiurinee/domain/recommendFlower/dto/RecommendFlowerDto.java index d6648f2..0cfb532 100644 --- a/src/main/java/com/example/fiurinee/domain/recommendFlower/dto/RecommendFlowerDto.java +++ b/src/main/java/com/example/fiurinee/domain/recommendFlower/dto/RecommendFlowerDto.java @@ -50,13 +50,7 @@ public static RecommendFlowerDto of(Long order, Member member){ RecommendFlowerDto recommendFlowerDto = new RecommendFlowerDto(); recommendFlowerDto.order = order; recommendFlowerDto.recommendFlower = flower.getName(); - if(flower.getPeriod() < 1000){ - Long p = flower.getPeriod() / 10; - }else{ - Long p = flower.getPeriod() / 100; - } - - recommendFlowerDto.period = flower.getPeriod().toString(); + recommendFlowerDto.period = String.format("%02d", flower.getPeriod() / 100); recommendFlowerDto.flower_language = flower.getFlowerLanguage(); recommendFlowerDto.explain = flower.getExplain(); recommendFlowerDto.image = flower.getImage();