Skip to content

Commit

Permalink
fix: #128 악기 목록 조회 API 검색 기능이 정상 동작하지 않는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Wo-ogie committed May 31, 2024
1 parent 9a277a2 commit e71d8ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@ private List<Predicate> convertInstrumentFilterAndSearchConditionsToPredicates(

// Searching
if (StringUtils.hasText(searchKeyword)) {
res.add(titlePath.containsIgnoreCase(searchKeyword));
res.add(tradeAddressSidoPath.containsIgnoreCase(searchKeyword));
res.add(tradeAddressSggPath.containsIgnoreCase(searchKeyword));
res.add(tradeAddressEmdPath.containsIgnoreCase(searchKeyword));
res.add(
titlePath.containsIgnoreCase(searchKeyword)
.or(tradeAddressSidoPath.containsIgnoreCase(searchKeyword))
.or(tradeAddressSggPath.containsIgnoreCase(searchKeyword))
.or(tradeAddressEmdPath.containsIgnoreCase(searchKeyword))
);
}

return res;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ public InstrumentRepositoryTest(
));

// when
Page<BassGuitar> result = sut.findBassGuitars(0, 10, sortOption, filterConditions, null);
// Page<BassGuitar> result = sut.findBassGuitars(0, 10, sortOption, filterConditions, null);
Page<BassGuitar> result = sut.findBassGuitars(0, 10, sortOption, filterConditions, "Test");

// then
assertThat(result.getNumberOfElements()).isEqualTo(savedInstruments.size() - 1);
Expand Down

0 comments on commit e71d8ce

Please sign in to comment.