Skip to content

Commit

Permalink
Merge pull request #28 from NOW-SOPT-APP4-KREAM/feat/#27
Browse files Browse the repository at this point in the history
Feat/#27
  • Loading branch information
rlarlgnszx authored May 20, 2024
2 parents 362a758 + c633c29 commit c1bf7b6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/main/java/com/app/kream/config/InitializeDefaultConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@
//
// public void saveMember(){
// Member member = Member.builder()
// .name("kihoon")
// .name("IOS")
// .age(20)
// .build();
//
// memberRepository.save(member);
//
//
// Member member2 = Member.builder()
// .name("ANDROID")
// .age(20)
// .build();
//
// memberRepository.save(member2);
// }
//
// public void saveProduct(){
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/app/kream/repository/ProductRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

@Repository
public interface ProductRepository extends JpaRepository<Product, Long> {
List<Product> findByBrandTitleContainingOrTitleContainingOrEngTitleContaining(String findName1,String findName2,String findName3);
List<Product> findByEngTitleContainingOrTitleContainingOrderByIdDesc(String findName1,String findName2);
List<Product> findByBrandTitleContainingIgnoreCaseOrTitleContainingIgnoreCaseOrEngTitleContainingIgnoreCase(String findName1,String findName2,String findName3);
List<Product> findByEngTitleContainingIgnoreCaseOrTitleContainingIgnoreCaseOrderByIdDesc(String findName1,String findName2);
}
4 changes: 2 additions & 2 deletions src/main/java/com/app/kream/service/ProductService.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ public SearchProductResponse findSearchProduct(
String findName
) {
return SearchProductResponse.of(
productRepository.findByBrandTitleContainingOrTitleContainingOrEngTitleContaining(findName, findName, findName)
productRepository.findByBrandTitleContainingIgnoreCaseOrTitleContainingIgnoreCaseOrEngTitleContainingIgnoreCase(findName, findName, findName)
.stream()
.map(SearchFindProductResponse::of)
.collect(Collectors.toList()),
productRepository.findByEngTitleContainingOrTitleContainingOrderByIdDesc(findName,findName)
productRepository.findByEngTitleContainingIgnoreCaseOrTitleContainingIgnoreCaseOrderByIdDesc(findName,findName)
.stream()
.map(RelateRecommendProductResponse::of)
.collect(Collectors.toList())
Expand Down

0 comments on commit c1bf7b6

Please sign in to comment.