Skip to content

Commit

Permalink
Merge pull request #108 from KAKAO-TOUR-API-CONTEST/develop
Browse files Browse the repository at this point in the history
[FIX] categoryBookmark
  • Loading branch information
femmefatalehaein authored Sep 29, 2024
2 parents d94db3e + f30d811 commit 4933b96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ public interface BookmarkRepository extends JpaRepository<Bookmark,Long> {
void deleteByUser(User user);




}
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ public List<BookMarkItem> getBookmarkByCategoryId (Long userId, int categoryId){
Optional<Store> store = storeRepository.findByStoreId(bookmark.getStoreId());
List<Bookmark> bmks = bookmarkRepository.findByStoreId(store.get().getStoreId());
//그리고 카테고리 아이디가 내가 제시한 카테고리 아이디랑 같다면,
if(store.isPresent()&&categoryId==store.get().getCategoryId() ){
if(categoryId == store.get().getCategoryId()){
System.out.println("확인"+store.get().getCategoryId());
BookMarkItem bookMarkItem = BookMarkItem.builder()
.storeId(bookmark.getStoreId())
.storeName(store.get().getName())
.imgsrc(store.get().getImgSrc())
.noKidszone(store.get().getNoKidsZone())
.numOfBmk(bmks.size())
.build();
Expand Down

0 comments on commit 4933b96

Please sign in to comment.