Skip to content

Commit

Permalink
#201 refactor:필요없는 res 컬럼 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
leeseunghakhello committed Jan 6, 2024
1 parent 05d8ba7 commit 5f1d2f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ public class ExperienceDetailRes {
private Long price;
private List<ExplanationRes> explanation;
private String description;
private String expCategory;
private String sttCategory;

public static ExperienceDetailRes toDto(ExperienceGift experienceGift,List<String> giftImgUrl){
return ExperienceDetailRes.builder()
.ExperienceGiftId(experienceGift.getId())
.title(experienceGift.getTitle())
.price(experienceGift.getPrice())
.description(experienceGift.getDescription())
.subtitle(experienceGift.getSubtitle().getTitle())
.expCategory(experienceGift.getExperienceCategory().getExpCategory())
.sttCategory(experienceGift.getSituationCategory().getSttCategory())
.giftImgUrl(giftImgUrl)
.build();
}

public static ExperienceDetailRes toDetailDto(ExperienceGift experienceGift, List<Explanation> explanations,List<String> giftImgUrl){
ExperienceDetailRes experienceDetailRes=new ExperienceDetailRes();
Expand All @@ -46,6 +31,7 @@ public static ExperienceDetailRes toDetailDto(ExperienceGift experienceGift, Lis
experienceDetailRes.title=experienceGift.getTitle();
experienceDetailRes.subtitle=experienceGift.getSubtitle().getTitle();
experienceDetailRes.price=experienceGift.getPrice();
experienceDetailRes.description=experienceGift.getDescription();
experienceDetailRes.explanation=explanations.stream().map(m -> ExplanationRes.toDto(m.getStage(),m.getDescription(), m.getExplanationKey())).collect(Collectors.toList());
return experienceDetailRes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
@AllArgsConstructor
public class ExperienceSttCategoryRes {

private Long sttCategoryId;
private Long ExperienceGiftId;
private String subtitleTitle;
private String title;
Expand All @@ -23,7 +22,6 @@ public class ExperienceSttCategoryRes {

public static ExperienceSttCategoryRes toDto(ExperienceGift experienceGift,List<String> giftImgUrl){
return ExperienceSttCategoryRes.builder()
.ExperienceGiftId(experienceGift.getSituationCategory().getId())
.ExperienceGiftId(experienceGift.getId())
.subtitleTitle(experienceGift.getSubtitle().getTitle())
.title(experienceGift.getTitle())
Expand Down

0 comments on commit 5f1d2f0

Please sign in to comment.