Skip to content

Commit

Permalink
Merge pull request #42 from GOAT-WAAAM/refactor/ldy/string-util
Browse files Browse the repository at this point in the history
[HOTFIX] 정렬 키워드가 없을 때 잘못 동작하는 로직 수정
  • Loading branch information
leedy3838 authored Jul 19, 2024
2 parents 7b4aaa7 + 4f32dbb commit 32d6af5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public List<DirectoryResponse> findAllDirectoryResponseBySortAndSearch(

//search가 null이면 parentDirectoryId로 검색, 아니면 search로 검색 - search 존재 -> 전체 검색
private BooleanExpression isSearchExpression(Long parentDirectoryId, String search) {
if (StringUtils.hasLength(search)) {
if (!StringUtils.hasLength(search)) {
return parentDirectoryFindExpression(parentDirectoryId);
} else {
return directory.title.contains(search);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public List<ReviewSimpleResponse> findAllReviewSimpleResponseBySortAndSearch(

//search가 null이면 parentDirectoryId로 검색, 아니면 search로 검색 - search 존재 -> 전체 검색
private BooleanExpression searchExpression(Long parentDirectoryId, String search) {
if (StringUtils.hasLength(search)) {
if (!StringUtils.hasLength(search)) {
return review.directory.id.eq(parentDirectoryId);
} else {
return review.title.contains(search);
Expand Down

0 comments on commit 32d6af5

Please sign in to comment.