Skip to content

Commit

Permalink
RAC-231 fix : 상세조회 이외에 단순 목록 조회 가능하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Dec 14, 2023
1 parent 9e87f83 commit de2fa1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

public interface MentoringRepository extends JpaRepository<Mentoring, Long> {
Optional<Mentoring> findByMentoringIdAndUser_IsDeleteAndSenior_User_IsDelete(Long mentoringId, Boolean isUserDelete, Boolean isSeniorDelete);
List<Mentoring> findAllByUserAndStatusAndSenior_User_IsDelete(User user, Status status, Boolean isDelete);
List<Mentoring> findAllBySeniorAndStatusAndUser_IsDelete(Senior senior, Status status, Boolean isDelete);
List<Mentoring> findAllByUserAndStatus(User user, Status status);
List<Mentoring> findAllBySeniorAndStatus(Senior senior, Status status);
List<Mentoring> findAllByStatusAndCreatedAtIsBefore(Status status, LocalDate now);
List<Mentoring> findAllByUser_UserId(Long userId);
List<Mentoring> findAllBySenior_SeniorId(Long seniorId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public class MentoringGetService {
private final MentoringRepository mentoringRepository;

public List<Mentoring> mentoringByUser(User user, Status status) {
return mentoringRepository.findAllByUserAndStatusAndSenior_User_IsDelete(user, status, FALSE);
return mentoringRepository.findAllByUserAndStatus(user, status);
}

public List<Mentoring> mentoringBySenior(Senior senior, Status status) {
return mentoringRepository.findAllBySeniorAndStatusAndUser_IsDelete(senior, status, FALSE);
return mentoringRepository.findAllBySeniorAndStatus(senior, status);
}

public Mentoring byMentoringId(Long mentoringId) {
Expand Down

0 comments on commit de2fa1a

Please sign in to comment.