Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
public interface BookLogRepository extends JpaRepository<BookLog, Long> {
Optional<BookLog> findFirstByMyBookAndBooklogType(MyBook myBook, String booklogType);
Page<BookLog> findByMyBook_MybookId(Long mybookId, Pageable pageable);
void deleteByMyBook(MyBook myBook);
}
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@ public void deleteMyBook(UUID memberId, Integer id) {
throw new BaseException(BOOK_NOT_OWNED_BY_MEMBER);
}

myBook.updateToInactive();
myBookRepository.save(myBook);
bookLogRepository.deleteByMyBook(myBook);

myBookRepository.delete(myBook);
}

// 책 주인 확인
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public NoticeListRes getNotices(Integer page, Integer limit) {
noticeDTOs,
noticePage.hasNext(),
noticePage.getNumber() + 1,
noticePage.getTotalPages() + 1
noticePage.getTotalPages()
);
}

Expand Down