File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/main/java/com/back/domain/chatbot/service Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -652,9 +652,18 @@ private StepRecommendationResponseDto getFinalRecommendationsWithMessage(
652652 List <AlcoholStrength > strengths = (alcoholStrength == null ) ? null : List .of (alcoholStrength );
653653 List <AlcoholBaseType > baseTypes = (alcoholBaseType == null ) ? null : List .of (alcoholBaseType );
654654
655+ // 'x', '없음' 입력 시 키워드 조건 무시
656+ String keyword = null ;
657+ if (userMessage != null && !userMessage .trim ().isEmpty ()) {
658+ String trimmed = userMessage .trim ().toLowerCase ();
659+ if (!trimmed .equals ("x" ) && !trimmed .equals ("없음" )) {
660+ keyword = userMessage ;
661+ }
662+ }
663+
655664 // userMessage를 키워드로 사용하여 검색
656665 Page <Cocktail > cocktailPage = cocktailRepository .searchWithFilters (
657- userMessage , // 사용자 입력 메시지를 키워드로 사용
666+ keyword , // 'x', '없음'이면 null, 아니면 사용자 입력 메시지
658667 strengths ,
659668 null , // cocktailType 사용 안 함
660669 baseTypes ,
You can’t perform that action at this time.
0 commit comments