Skip to content

Commit

Permalink
chore: dto 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonsseo committed Jan 30, 2024
1 parent 2985934 commit 2e3bb36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public List<FragranceInfo> searchSimilarFragranceAnd(Long fragranceId, Long fami
fragrance.id.as("fragranceId"),
fragrance.thumbnail,
fragrance.name.as("fragranceName"),
fragrance.brand.korName
fragrance.brand.korName.as("brandName")
))
.from(fragranceFamily)
.join(fragranceFamily.fragrance, fragrance)
Expand Down Expand Up @@ -146,7 +146,7 @@ public List<FragranceInfo> searchSimilarFragranceOr(SimilarFragranceOrCond cond)
fragrance.id.as("fragranceId"),
fragrance.thumbnail,
fragrance.name.as("fragranceName"),
fragrance.brand.korName
fragrance.brand.korName.as("brandName")
))
.from(fragranceFamily)
.join(fragranceFamily.fragrance, fragrance)
Expand All @@ -168,7 +168,7 @@ public List<FragranceInfo> searchSimilarFragrance(Long fragranceId, Long familyI
fragrance.id.as("fragranceId"),
fragrance.thumbnail,
fragrance.name.as("fragranceName"),
fragrance.brand.korName
fragrance.brand.korName.as("brandName")
))
.from(fragranceFamily)
.join(fragranceFamily.fragrance, fragrance)
Expand Down Expand Up @@ -252,7 +252,7 @@ public Page<FragranceInfo> searchFragrance(SearchCond cond, String additionalFam
fragrance.id.as("fragranceId"),
fragrance.thumbnail,
fragrance.name.as("fragranceName"),
fragrance.brand.korName
fragrance.brand.korName.as("brandName")
)).distinct()
.from(fragranceFamily)
.where(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ public class FragranceInfo {
private Long fragranceId;
private String thumbnail;
private String fragranceName;
private String korBrand;
private String brandName;

@QueryProjection
public FragranceInfo(Long fragranceId, String thumbnail, String fragranceName, String korBrand) {
this.fragranceId = fragranceId;
this.thumbnail = thumbnail;
this.fragranceName = fragranceName;
this.korBrand = korBrand;
this.brandName = korBrand;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package server.acode.domain.fragrance.dto.response;

import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import server.acode.domain.fragrance.entity.Fragrance;
Expand All @@ -18,21 +17,20 @@ public class GetFragranceResponse {
private String image1;
private String image2;

private String korBrand;
private String brandName;
private String fragranceName;
private String concentration;

private List<FamilyInfo> familyList;
private List<CapacityInfo> capacityList;
private List<String> style;

// @Builder
public GetFragranceResponse(Fragrance fragrance, boolean isScraped, List<FamilyInfo> familyList, List<CapacityInfo> capacityList) {
this.fragranceId = fragrance.getId();
this.thumbnail = fragrance.getThumbnail();
this.image1 = fragrance.getImage1();
this.image2 = fragrance.getImage2();
this.korBrand = fragrance.getBrand().getKorName();
this.brandName = fragrance.getBrand().getKorName();
this.fragranceName = fragrance.getName();
this.concentration = fragrance.getConcentration().name();
this.style = Arrays.asList(fragrance.getStyle().split(", "));
Expand Down

0 comments on commit 2e3bb36

Please sign in to comment.