Skip to content

Commit

Permalink
Merge pull request #204 from ShallWeProject/refactor/201-experienceGi…
Browse files Browse the repository at this point in the history
…ft-logic

#201 refactor:필요없는 res 컬럼 삭제
  • Loading branch information
leeseunghakhello authored Jan 7, 2024
2 parents 05d8ba7 + bd1363c commit 61c8c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,7 @@ 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();
}
private String location;

public static ExperienceDetailRes toDetailDto(ExperienceGift experienceGift, List<Explanation> explanations,List<String> giftImgUrl){
ExperienceDetailRes experienceDetailRes=new ExperienceDetailRes();
Expand All @@ -46,6 +32,8 @@ 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.location=experienceGift.getLocation();
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 61c8c6e

Please sign in to comment.