Skip to content

Commit

Permalink
Merge pull request #5 from MARKETFUBY/feat/search
Browse files Browse the repository at this point in the history
chore: 제품 목록 GET API에서 카테고리 부분 수정
  • Loading branch information
choiyounji authored Nov 14, 2023
2 parents 1928eaa + 9617727 commit e77a1a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/MARKETFUBY/Product/service/ProductService.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public ProductsListDto getProductList(Integer sort, Long filters, Long eventId){
for(BigCategory category:bigCategoryList){
//BigCategory bigCategory=categoryRepository.findById(1L).orElseThrow(()->new IllegalArgumentException("존재하지 않는 카테고리입니다."));
//BigCategory bigCategory=categoryRepository.findById(i).orElseThrow(()->new IllegalArgumentException("존재하지 않는 카테고리입니다."));
if(productRepository.existsByBigCategory(category)){
int count= productRepository.countByBigCategoryAndEvent(category,event);
int count= productRepository.countByBigCategoryAndEvent(category,event);
if(count!=0){
CategoryDto categoryDto=new CategoryDto();
categoryDto.setCount(count);
categoryDto.setName(category.getName());
Expand Down

0 comments on commit e77a1a8

Please sign in to comment.