Skip to content

Commit

Permalink
chore: period 반환 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ss7622 committed Jul 7, 2024
1 parent 4be364c commit d95dbb5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static List<HarmonyRecentDto> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d95dbb5

Please sign in to comment.