Skip to content

Commit

Permalink
fix (#1) : 오타 및 예외 분기 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
daehwan2yo committed Apr 9, 2022
1 parent cc8b571 commit 7adba6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private List<Exam> extractExams(Account account, CreateCalendarRequest createCal
return createCalendarRequest.getExams()
.stream()
.map(dto -> Exam.builder()
.dueDateTime(dto.getLocalDateTime())
.dueDateTime(dto.getDate())
.name(dto.getName())
.studyDegree(dto.getPrepareTime())
.account(account)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CreateCalendarRequest {
public static class ExamInfo {
private String name;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm")
private LocalDateTime localDateTime;
private LocalDateTime date;
private int prepareTime;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private static boolean noRemainTime(List<Exam> exams, int dailyQuota, LocalDate
int allOfStudyTime = getRemainDays(exams.get(exams.size() - 1), today) * dailyQuota;

for (Exam exam : exams) {
if (allOfStudyTime <= exam.getStudyDegree()) {
if (allOfStudyTime < exam.getStudyDegree()) {
return true;
}
allOfStudyTime -= exam.getStudyDegree();
Expand Down

0 comments on commit 7adba6b

Please sign in to comment.