-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] 포트폴리오 추천 (최신 순) 기능 구현
- Loading branch information
Showing
11 changed files
with
99 additions
and
62 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/main/java/umc/meme/shop/domain/artist/converter/ArtistConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 7 additions & 8 deletions
15
...o/response/FavoriteArtistResponseDto.java → .../artist/dto/response/SimpleArtistDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
src/main/java/umc/meme/shop/domain/favorite/dto/response/FavoritePortfolioResponseDto.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/umc/meme/shop/domain/portfolio/dto/response/SimplePortfolioDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package umc.meme.shop.domain.portfolio.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import umc.meme.shop.domain.artist.entity.Artist; | ||
import umc.meme.shop.domain.favorite.entity.FavoritePortfolio; | ||
import umc.meme.shop.domain.portfolio.entity.Portfolio; | ||
import umc.meme.shop.global.enums.Category; | ||
import umc.meme.shop.global.enums.MakeupLocation; | ||
|
||
@Getter | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SimplePortfolioDto { | ||
private Long portfolioId; | ||
private String portfolioImg; | ||
private Category category; | ||
private String makeupName; | ||
private String artistName; | ||
private int price; | ||
private MakeupLocation makeupLocation; //샵 재직 여부 | ||
|
||
public static SimplePortfolioDto from(FavoritePortfolio favoritePortfolio){ | ||
Portfolio portfolio = favoritePortfolio.getPortfolio(); | ||
Artist artist = portfolio.getArtist(); | ||
|
||
return SimplePortfolioDto.builder() | ||
.portfolioId(portfolio.getPortfolioId()) | ||
.portfolioImg(portfolio.getPortfolioImgList().get(0).getSrc()) | ||
.category(portfolio.getCategory()) | ||
.makeupName(portfolio.getMakeupName()) | ||
.artistName(artist.getNickname()) | ||
.price(portfolio.getPrice()) | ||
.makeupLocation(artist.getMakeupLocation()) | ||
.build(); | ||
} | ||
|
||
public static SimplePortfolioDto from(Portfolio portfolio){ | ||
Artist artist = portfolio.getArtist(); | ||
|
||
return SimplePortfolioDto.builder() | ||
.portfolioId(portfolio.getPortfolioId()) | ||
.portfolioImg(portfolio.getPortfolioImgList().get(0).getSrc()) | ||
.category(portfolio.getCategory()) | ||
.makeupName(portfolio.getMakeupName()) | ||
.artistName(artist.getNickname()) | ||
.price(portfolio.getPrice()) | ||
.makeupLocation(artist.getMakeupLocation()) | ||
.build(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters