-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BYOB-232] 구매 노트 및 감상 노트 목록 조회 시 발생하는 N+1 문제 해결 (#75)
* fix: Note에 연관된 Liquor를 v2로 변경 * fix: MultipleBagFetchException을 피해서 N+1 문제를 해결하기 위해 BatchSize 적용
- Loading branch information
Showing
10 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/team_alcoholic/jumo_server/v2/liquor/dto/LiquorSimpleRes.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,31 @@ | ||
package team_alcoholic.jumo_server.v2.liquor.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import team_alcoholic.jumo_server.v2.liquor.domain.NewLiquor; | ||
|
||
/** | ||
* | ||
*/ | ||
@Getter @Setter | ||
public class LiquorSimpleRes { | ||
private Long id; | ||
private String koName; | ||
private String enName; | ||
private String thumbnailImageUrl; | ||
private String type; | ||
private String abv; | ||
// private LiquorCategoryRes category; | ||
|
||
public static LiquorSimpleRes from(NewLiquor liquor) { | ||
LiquorSimpleRes dto = new LiquorSimpleRes(); | ||
dto.setId(liquor.getId()); | ||
dto.setKoName(liquor.getKoName()); | ||
dto.setEnName(liquor.getEnName()); | ||
dto.setThumbnailImageUrl(liquor.getThumbnailImageUrl()); | ||
dto.setType(liquor.getType()); | ||
dto.setAbv(liquor.getAbv()); | ||
|
||
return dto; | ||
} | ||
} |
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
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
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