-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: 코드 리팩토링 #35
Changes from 14 commits
4150300
556fd2a
1a52af3
1248aee
6ae2a08
9321047
d4629ed
5c6d5ef
df6cc02
042e4b4
6d3d66a
7b47a09
5d7f207
5bf1d6e
5eb3161
d141ecb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,12 @@ | |
import server.acode.domain.family.entity.Family; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
@Repository | ||
public interface FamilyRepository extends JpaRepository<Family, Long>{ | ||
boolean existsByKorName(String korName); | ||
Family findByKorName(String korName); | ||
Optional<Family> findByKorName(String korName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 헉 옵셔널로 감싸두지 않았었군요..! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NULL 체크를 빼먹거나 아니면 불필요하게 체크하는 일을 방지하기 위해서죠! |
||
|
||
List<Family> findByIdIn(List<Long> familyIdList); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ | |
import org.springframework.stereotype.Repository; | ||
import server.acode.domain.family.dto.SimilarFragranceOrCond; | ||
import server.acode.domain.family.dto.request.FragranceFilterCond; | ||
import server.acode.domain.family.dto.response.DisplayFragrance; | ||
import server.acode.domain.family.dto.response.HomeFragrance; | ||
import server.acode.domain.family.dto.response.FragranceCatalogDto; | ||
import server.acode.domain.family.dto.response.HomeFragranceDto; | ||
import server.acode.domain.fragrance.dto.request.SearchCond; | ||
import server.acode.domain.fragrance.dto.response.ExtractFragrance; | ||
import server.acode.domain.fragrance.dto.response.FamilyCountDto; | ||
|
@@ -16,9 +16,9 @@ | |
|
||
@Repository | ||
public interface FragranceFamilyRepositoryCustom { | ||
List<HomeFragrance> search(String familyName); | ||
List<HomeFragranceDto> search(String familyName); | ||
|
||
Page<DisplayFragrance> searchByFilter(FragranceFilterCond cond, String additionalFamily, Pageable pageable); | ||
Page<FragranceCatalogDto> searchByBrandAndFamily(FragranceFilterCond cond, Pageable pageable); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기에서 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아아 컨디션 DTO에 넣으셨군용 |
||
|
||
List<Long> searchFamilyByFragranceId(Long fragranceId); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
의미 있는 이름으로 변경해주셔서 어떤 일을 수행하는 메소드인지 더 잘 파악할 수 있는 것 같아용👍🏻👍🏻