Repository navigation
[Feat/#317] 홈 사물함 배정 상태에 신청가능 추가 - #318
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
github-actions
Bot
requested review from
jjunh33,
leegain1,
tnals0924 and
xeoxxn
November 22, 2026 16:30
This was referenced Nov 22, 2026
tnals0924
reviewed
Nov 25, 2026
| return new HomeResponse.Locker(HomeLockerStatus.NOT_APPLIED, null); | ||
| } | ||
|
|
||
| private HomeResponse.Locker toLocker( |
Member
There was a problem hiding this comment.
[a] 리뷰 포인트 주신 toLocker 판정에 대한 의견이에요. 본문 표대로 판정하는 것 같아요.
- 회차 없음:
getHome의orElseGet에서NOT_APPLIED - 신청함:
LockerApplicationStatus.from이isUsageEnded로ASSIGNED/EXPIRED를 가르고, 칸 번호는ASSIGNED일 때만 내려가요.isApplyOpen이!isUsageEnded를 포함해서 "신청 기간 중인데EXPIRED"는 나오지 않습니다 - 신청 안 함:
isApplyOpen(now)로APPLICABLE/NOT_APPLIED. 신청 API(LockerApplicationServiceImpl.validateApplyOpen)도 같은 메서드를 써서, 홈이APPLICABLE이면 실제로 신청이 열려 있어요
경계도 맞아요. 쿼리의 applyStartAt <= :at는 절삭하지 않은 now를 쓰고 isApplyOpen은 초 단위로 자르는데, applyStartAt이 atStartOfDay라 두 판정이 같은 순간에 바뀝니다. 취소된 신청(findAllByMemberIdAndIsCanceledFalse...)과 게시를 내린 회차도 쿼리와 getApplicationsByMemberId가 둘 다 걸러서 본문 Edge Case대로 동작해요.
xeoxxn
reviewed
Nov 26, 2026
leegain1
reviewed
Nov 26, 2026
leegain1
reviewed
Nov 26, 2026
leegain1
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
디자인에서 홈의 사물함 배정 상태가 미신청·신청가능·배정완료·기간종료 네 가지로 정해졌는데,
HomeLockerStatus에는 신청가능이 없었다.판정 기준도 디자인과 달랐다. 지금은 내 신청 이력 전체를 보고 정해서, 지난 학기에 배정받은 학생이 이번 회차를 신청하지 않으면 미신청이 아니라 기간종료로 나간다.
❓ 왜 해결해야 하나요?
신청 기간에 아직 신청하지 않은 학생에게 홈에서 신청을 안내해야 한다. 프론트가 디자인대로 그리려면 서버가 이 상태를 내려줘야 한다.
⭐ 어떻게 해결했나요?
홈 사물함 상태를 신청이 시작된 가장 최근 회차 하나로만 판정한다.
ASSIGNEDASSIGNEDEXPIREDAPPLICABLENOT_APPLIEDNOT_APPLIEDNOT_APPLIEDASSIGNED가 아니어도 신청 시작 전 회차에 운영진이 미리 배정한 칸이 있으면 그 칸으로ASSIGNED. 알림·"내 사물함"이 이미 배정으로 보여 주는 칸이라 홈도 맞춘다. 이미 읽은 신청 내역에서 찾아 쿼리는 늘지 않는다LockerRepository.findLatestStartedPublishedPeriod(now)로 읽는다. 게시된 회차 중applyStartAt <= now인 것을 신청 시작 늦은 순으로 한 건 고른다CurrentLocker.of가 하고, 최근 회차와 신청 내역을 짝짓는 것은LockerApplicationService.getCurrentLocker가 맡는다. 홈 UseCase는 결과를 응답으로 바꾸기만 한다LockerApplicationService.getAppliedPeriodIds로 신청한 회차 식별자만 읽는다LockerPeriod.isApplyOpen, 배정완료·기간종료는LockerApplicationStatus.from, 미리 배정은LockerPeriod.calculateStatus의UPCOMING으로 판정한다. 신청 API, 내 사물함 화면과 같은 기준이다getHome의now하나로 맞췄다이전 회차 배정은 보지 않는다. 회차는 범위(신청 시작일~이용 종료일)가 겹치지 않아서(
validateNotOverlapped) 최근 회차 신청이 시작됐으면 이전 회차 이용은 끝나 있다.🧩 이 PR의 한계 & 트레이드오프
⛓️ 기존 기능에 미치는 영향
프론트가 알아야 할 응답 변경이 두 가지다.
locker.status에APPLICABLE값 추가: 모르는 값을 받으면 깨지는지 확인이 필요하다EXPIRED→NOT_APPLIED로 바뀌는 경우: 지난 배정만 있고 이번 회차를 놓친 학생이다. 디자인 기준(이용 기간인데 신청하지 않음 → 미신청)에 맞춘 의도한 변경이다"내 사물함" 신청 내역(
GET /v1/app/lockers/applications)은 바뀌지 않는다.🔀 Edge Case & 실패 시나리오
ASSIGNED다. 디자인의 "신청 완료 및 배정 확정"과 맞는다APPLICABLE, 아니면NOT_APPLIEDassignLocker는 신청 시작 전 회차에도 배정할 수 있다. 신청이 시작되기 전에도 그 칸으로ASSIGNED가 나간다. 지금 회차에도 배정이 있으면 지금 회차 칸을 보여 준다📋 검토한 대안과 선택 이유
💬 리뷰 포인트
[r]CurrentLocker.of: 위 표대로 판정하고, 미리 배정한 칸을 최근 회차의 배정 다음 순서로 보는지 봐 주세요