Skip to content

Commit

Permalink
[FIX] 지원결과 확인 api수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wken5577 committed Apr 6, 2024
1 parent e4795e9 commit a6ff2f3
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ public ApplicationResultSvcDto findApplicationResult(FindApplicationResultParam
result = ApplicationResultSvcDto.nullResult();
} else {
Application application = optionalApplication.get();
RecruitStatus recruitStatus = recruitStatusRepository.findByApplicationId(param.getApplicationId())
.orElseThrow(IllegalStateException::new);
result = ApplicationResultSvcDto.of(application.getRecruitTitle(),
application.getStatus(), recruitStatus.getInterviewDate());
Optional<RecruitStatus> recruitStatusOptional = recruitStatusRepository.findByApplicationId(
param.getApplicationId());
result = recruitStatusOptional.map(
recruitStatus -> ApplicationResultSvcDto.of(application.getRecruitTitle(),
application.getStatus(), recruitStatus.getInterviewDate()))
.orElseGet(
() -> ApplicationResultSvcDto.of(application.getRecruitTitle(), application.getStatus(), null));
}
return result;
}
Expand Down

0 comments on commit a6ff2f3

Please sign in to comment.