Skip to content

Commit

Permalink
chore: dto 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yj-leez committed Feb 1, 2024
1 parent 19f3745 commit 425d76c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.querydsl.core.annotations.QueryProjection;
import lombok.Data;
import server.acode.domain.fragrance.entity.Concentration;

@Data
public class DisplayFragrance {
Expand All @@ -10,12 +11,14 @@ public class DisplayFragrance {
private String brandName; // 브랜드 이름
private String fragranceName; // 향수 이름
private String thumbnail;
private String concentration;

@QueryProjection
public DisplayFragrance (Long fragranceId, String brandName, String fragranceName, String thumbnail){
public DisplayFragrance (Long fragranceId, String brandName, String fragranceName, String thumbnail, Concentration concentration){
this.fragranceId = fragranceId;
this.brandName = brandName;
this.fragranceName = fragranceName;
this.thumbnail = thumbnail;
this.concentration = concentration.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public Page<DisplayFragrance> searchByFilter(FragranceFilterCond cond, String ad
fragrance.id.as("fragranceId"),
brand.korName.as("brandName"),
fragrance.name.as("fragranceName"),
fragrance.thumbnail
fragrance.thumbnail,
fragrance.concentration
))
.from(fragranceFamily)
.join(fragranceFamily.fragrance, fragrance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public Page<DisplayFragrance> searchByIngredient(String ingredientName, Pageable
fragrance.id.as("fragranceId"),
brand.korName.as("brandName"),
fragrance.name.as("fragranceName"),
fragrance.thumbnail
fragrance.thumbnail,
fragrance.concentration
))
.from(fragrance)
.join(fragrance.brand, brand)
Expand Down

0 comments on commit 425d76c

Please sign in to comment.