[smartthings] 기기 유형별 완료 예정 시간 조회 수정#96
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the completion time retrieval logic to distinguish between washers and dryers by passing the machine type to the device status DTO. This change is integrated across status queries, overdue processing, and reservation lifecycle processors, alongside new unit tests. The review feedback highlights a misplaced Javadoc comment in the DTO, suggests using the new DTO method directly instead of a private helper in the lifecycle processor, and recommends adding defensive null checks for the expected completion time in both the lifecycle and overdue processors to prevent potential NullPointerExceptions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
개요
SmartThings기기 상태 응답에서 세탁기/건조기 완료 예정 시간이 함께 내려오는 경우, 기기 유형에 맞는 완료 예정 시간을 조회하도록 수정했습니다.본문
기존에는
SmartThingsDeviceStatusResDto.getCompletionTime()이 세탁기 완료 예정 시간을 우선 반환해, 건조기 상태 조회 또는 예약 생명주기 처리에서 세탁기 완료 예정 시간이 사용될 수 있었습니다.
이를 해결하기 위해
SmartThingsDeviceStatusResDto.getCompletionTime(boolean isWasher)를 추가하고,QueryAllMachinesStatusServiceImpl,ReservationLifecycleProcessor,OverdueReservationProcessor에서machine.isWasher()기준으로 완료 예정 시간을 선택하도록 변경했습니다.또한
DateTimeUtil에 기기 유형 기반 완료 예정 시간 조회 오버로드를 추가하고, 세탁기/건조기 완료 예정 시간이 함께 존재할 때 건조기 예약과 상태 조회가 건조기 완료 예정시간을 사용하는 테스트를 추가했습니다.
검증:
./gradlew spotlessApply./gradlew test --tests "team.washer.server.v2.domain.machine.service.QueryAllMachinesStatusServiceTest" --tests "team.washer.server.v2.domain.reservation.service.ReservationLifecycleProcessorTest" --tests "team.washer.server.v2.domain.reservation.service.OverdueReservationProcessorTest"./gradlew test