Skip to content

Commit

Permalink
[style] : spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackBean99 committed Sep 1, 2023
1 parent 8cb9383 commit 94a1bfd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
Binary file modified server/.gradle/7.6.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified server/.gradle/7.6.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified server/.gradle/7.6.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified server/.gradle/7.6.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified server/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public UUID execute(List<BlockRequestDto> blocks) {
List<Question> questions = questionAdaptor.findAll();
UUID applicantId = UUID.randomUUID();


List<Answer> results =
blocks.stream()
.map(
Expand Down Expand Up @@ -64,12 +63,15 @@ public UUID execute(List<BlockRequestDto> blocks) {
})
.collect(Collectors.toList());
// classOf 가 기존에 존재하면 중복된 지원자 입니다.
String studentId = results.stream()
.filter(answer -> answer.getQuestion().getName().equals("classOf"))
.findFirst().get().getAnswer();
String studentId =
results.stream()
.filter(answer -> answer.getQuestion().getName().equals("classOf"))
.findFirst()
.get()
.getAnswer();

// 이미 제출한 학생은 중복 지원자입니다. (학번으로 검증)
if(answerAdaptor.findByAnswer(studentId) != null)
if (answerAdaptor.findByAnswer(studentId) != null)
throw ApplicantDuplicateSubmitException.EXCEPTION;

// Result 를 save 하게 된다.
Expand All @@ -89,7 +91,6 @@ public UUID execute(List<BlockRequestDto> blocks) {
.map(Answer::getAnswer)
.orElseThrow(() -> new RuntimeException("이름을 찾을 수 없습니다."));


ApplicantRegisterEvent applicantRegisterEvent =
ApplicantRegisterEvent.of(applicantId.toString(), name, hopeField);
Events.raise(applicantRegisterEvent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public interface AnswerRepository extends JpaRepository<Answer, Long> {
List<Answer> findByApplicantId(String applicantId);

Page<Answer> findAll(Pageable pageable);

Optional<Answer> findByAnswer(String name);
}

0 comments on commit 94a1bfd

Please sign in to comment.