diff --git a/src/main/java/com/postgraduate/domain/mentoring/domain/repository/MentoringRepository.java b/src/main/java/com/postgraduate/domain/mentoring/domain/repository/MentoringRepository.java index 07c209db..5d68c50f 100644 --- a/src/main/java/com/postgraduate/domain/mentoring/domain/repository/MentoringRepository.java +++ b/src/main/java/com/postgraduate/domain/mentoring/domain/repository/MentoringRepository.java @@ -12,8 +12,8 @@ public interface MentoringRepository extends JpaRepository { Optional findByMentoringIdAndUser_IsDeleteAndSenior_User_IsDelete(Long mentoringId, Boolean isUserDelete, Boolean isSeniorDelete); - List findAllByUserAndStatusAndSenior_User_IsDelete(User user, Status status, Boolean isDelete); - List findAllBySeniorAndStatusAndUser_IsDelete(Senior senior, Status status, Boolean isDelete); + List findAllByUserAndStatus(User user, Status status); + List findAllBySeniorAndStatus(Senior senior, Status status); List findAllByStatusAndCreatedAtIsBefore(Status status, LocalDate now); List findAllByUser_UserId(Long userId); List findAllBySenior_SeniorId(Long seniorId); diff --git a/src/main/java/com/postgraduate/domain/mentoring/domain/service/MentoringGetService.java b/src/main/java/com/postgraduate/domain/mentoring/domain/service/MentoringGetService.java index d68f3f85..6afc0434 100644 --- a/src/main/java/com/postgraduate/domain/mentoring/domain/service/MentoringGetService.java +++ b/src/main/java/com/postgraduate/domain/mentoring/domain/service/MentoringGetService.java @@ -20,11 +20,11 @@ public class MentoringGetService { private final MentoringRepository mentoringRepository; public List mentoringByUser(User user, Status status) { - return mentoringRepository.findAllByUserAndStatusAndSenior_User_IsDelete(user, status, FALSE); + return mentoringRepository.findAllByUserAndStatus(user, status); } public List mentoringBySenior(Senior senior, Status status) { - return mentoringRepository.findAllBySeniorAndStatusAndUser_IsDelete(senior, status, FALSE); + return mentoringRepository.findAllBySeniorAndStatus(senior, status); } public Mentoring byMentoringId(Long mentoringId) {