Skip to content

Commit

Permalink
[BE] FIX: 잘못 올라간 코드 삭제 및 exception 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Z1Park committed Sep 15, 2023
1 parent b913f14 commit 54c7e0b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ public List<ActiveCabinetInfoEntities> findCabinetsActiveLentHistoriesByBuilding
}).collect(Collectors.toList());
}

public List<Cabinet> findCabinetByBuildingAndFloorWithLentHistoryAndUser(String building, Integer floor) {
log.info("Called findCabinetByBuildingAndFloorWithLentHistoryAndUser: {}, {}", building, floor);
return cabinetRepository.findCabinetByBuildingAndFloorWithLentHistoryAndUser(building, floor);
}

/**
* 유저 ID로 사물함을 찾습니다.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,4 @@ List<Object[]> findCabinetActiveLentHistoryUserListByBuildingAndFloor(
"FROM Cabinet c " +
"WHERE c.cabinetPlace.location.building = :building AND c.cabinetPlace.location.floor = :floor")
List<Cabinet> findAllByBuildingAndFloor(@Param("building") String building, @Param("floor") Integer floor);

@Query("SELECT c " +
"FROM Cabinet c " +
"LEFT JOIN FETCH c.lentHistories lh " +
"LEFT JOIN FETCH lh.user u " +
"WHERE c.cabinetPlace.location.building = :building AND c.cabinetPlace.location.floor = :floor ")
List<Cabinet> findCabinetByBuildingAndFloorWithLentHistoryAndUser(String building, Integer floor);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ public CustomServiceException(CustomExceptionStatus status) {
public CustomExceptionStatus getStatus() {
return status;
}

@Override
public String getMessage() {
return status.getMessage();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ public class DomainException extends RuntimeException{
public DomainException(ExceptionStatus status) {
this.status = status;
}

@Override
public String getMessage() {
return status.getMessage();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ public ServiceException(ExceptionStatus status) {
public ExceptionStatus getStatus() {
return status;
}

@Override
public String getMessage() {
return status.getMessage();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ public UtilException(ExceptionStatus status) {
this.status = status;
}

@Override
public String getMessage() {
return status.getMessage();
}

}

0 comments on commit 54c7e0b

Please sign in to comment.