Skip to content

Commit ec11ade

Browse files
authored
[refactor] 칵테일 한글이름 검색 기능추가, 검색결과 이후 전체 리스트 나오는 원인 검토.#248 (#249)
* fix : bugs of testCase, init data * fix : bug * refactor : add cocktailPreview field in cocktailSearchResponseDto * refactor : add getCocktails conditions * refactor : add function of searching korean name
1 parent aa496f6 commit ec11ade

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/back/domain/cocktail/repository/CocktailRepository.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ List<Cocktail> findByCommentsCountLessThanOrderByCommentsCountDesc(
6767
@Query("SELECT c FROM Cocktail c " +
6868
"WHERE (:keyword IS NULL OR :keyword = '' OR " +
6969
" LOWER(c.cocktailName) LIKE LOWER(CONCAT('%', :keyword, '%')) OR " +
70+
" LOWER(c.cocktailNameKo) LIKE LOWER(CONCAT('%', :keyword, '%')) OR " +
7071
" LOWER(c.ingredient) LIKE LOWER(CONCAT('%', :keyword, '%')))" +
7172
" AND (:strengths IS NULL OR c.alcoholStrength IN :strengths) " + // 알코올 도수 필터를 담당
7273
" AND (:types IS NULL OR c.cocktailType IN :types) " + // 칵테일 타입 필터를 담당

0 commit comments

Comments
 (0)