Skip to content

Commit

Permalink
[BE] 피드백 반영(pending 사물함 fetcher 이름 수정 및 주석 추가)
Browse files Browse the repository at this point in the history
  • Loading branch information
Z1Park committed Dec 2, 2023
1 parent 6d36ffd commit 5b9eee0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ public Cabinet getClubCabinet(Long cabinetId) {
return cabinet;
}

public List<Cabinet> findPendingCabinets(
/**
* building과 status에 맞고 lentType이 아닌 사물함을 찾습니다.
*
* @param building 건물 이름
* @param lentType 사물함 타입
* @param cabinetStatuses 사물함 상태 {@link List}
* @return {@link Cabinet} {@link List}
*/
public List<Cabinet> findPendingCabinetsNotLentTypeAndStatus(
String building, LentType lentType, List<CabinetStatus> cabinetStatuses) {
return cabinetRepository.findAllByBuildingAndLentTypeNotAndStatusIn(
building, lentType, cabinetStatuses);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public CabinetPendingResponseDto getPendingCabinets(String building) {
log.debug("getPendingCabinets");
final LocalDate yesterday = LocalDateTime.now().minusDays(1).toLocalDate();
List<Cabinet> buildingCabinets =
cabinetOptionalFetcher.findPendingCabinets(
cabinetOptionalFetcher.findPendingCabinetsNotLentTypeAndStatus(
building,
LentType.CLUB,
List.of(CabinetStatus.AVAILABLE, CabinetStatus.PENDING));
Expand Down

0 comments on commit 5b9eee0

Please sign in to comment.