Skip to content

Commit

Permalink
[BE] FIX : delete 테스트 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
Ssuamje committed Nov 29, 2023
1 parent 5b726b5 commit bc01334
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ public Page<LentExtension> findAllLentExtension(PageRequest pageable) {

@Transactional(readOnly = true)
public Page<LentExtension> findAllNotExpired(PageRequest pageable) {
return lentExtensionRepository.findAllNotExpired(pageable);
return lentExtensionRepository.findAllNotExpired(pageable)
.stream().filter(e -> !e.isUsed() && !e.isDeleted())
.collect(Collectors.collectingAndThen(Collectors.toList(), PageImpl::new));
}

@Transactional(readOnly = true)
public List<LentExtension> findAllNotExpired() {
return lentExtensionRepository.findAll()
.stream().filter(e -> !e.isUsed())
.stream().filter(e -> !e.isUsed() && !e.isDeleted())
.collect(Collectors.toList());
}

Expand Down

0 comments on commit bc01334

Please sign in to comment.