判断dest是否存在时需要考虑空字符串的时候
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -146,7 +146,7 @@ public class SearchRecommendServiceImpl implements ISearchRecommendService { | @@ -146,7 +146,7 @@ public class SearchRecommendServiceImpl implements ISearchRecommendService { | ||
146 | return defaultSuggestRecommendation(); | 146 | return defaultSuggestRecommendation(); |
147 | } | 147 | } |
148 | 148 | ||
149 | - JSONObject recommendResult = recommendBySuggestIndex(paramMap, keywordsToSearch, dest != null); | 149 | + JSONObject recommendResult = recommendBySuggestIndex(paramMap, keywordsToSearch, StringUtils.isNotEmpty(dest)); |
150 | if (recommendResult == null || CollectionUtils.isEmpty((List<?>) recommendResult.get("terms_suggestion"))) { | 150 | if (recommendResult == null || CollectionUtils.isEmpty((List<?>) recommendResult.get("terms_suggestion"))) { |
151 | recommendResult = defaultSuggestRecommendation(); | 151 | recommendResult = defaultSuggestRecommendation(); |
152 | } | 152 | } |
-
Please register or login to post a comment