Skip to content

Commit

Permalink
Merge pull request #499 from SWM-NM/feat/#498
Browse files Browse the repository at this point in the history
[FIX] 시험 결과의 정답 시간 반환값 변경
  • Loading branch information
aj4941 authored Oct 24, 2023
2 parents 82b95e5 + 2654dc6 commit 66e9774
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ public class AttemptProblemDto {
private Long testProblemId;
private Long bojProblemId;
private Boolean isSolved;
private Long executionTime;
private String executionTime;

public static AttemptProblemDto getAttemptProblemDto(AttemptProblem attemptProblem) {
Long attemptProblemExecutionTime = attemptProblem.getExecutionTime();
String executionTime = (attemptProblemExecutionTime == null)
? null : String.format("%d:%02d", attemptProblemExecutionTime / 60, attemptProblemExecutionTime % 60);
return AttemptProblemDto.builder()
.bojProblemId(attemptProblem.getProblem().getBojProblemId())
.isSolved(attemptProblem.getIsSolved())
.executionTime(attemptProblem.getExecutionTime())
.executionTime(executionTime)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.jaxb.SpringDataJaxb;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand Down

0 comments on commit 66e9774

Please sign in to comment.