diff --git a/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceListResDto.java b/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceListResDto.java index 4a58ec81..c309a269 100644 --- a/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceListResDto.java +++ b/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceListResDto.java @@ -42,6 +42,9 @@ private String formatUpdatedAt(LocalDateTime updatedAt) { private String calculateTimeUntilDeadline(LocalDateTime updatedAt, LocalDateTime deadline) { Duration duration = Duration.between(updatedAt, deadline); long days = duration.toDays(); - return days > 0 ? "D-" + days : "공고 기한 마감"; + if (days < 8 && days > 0) { + return "D-" + days; + } + else return null; } } diff --git a/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceResDto.java b/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceResDto.java index aa34513a..d72c2a8d 100644 --- a/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceResDto.java +++ b/src/main/java/umc/kkijuk/server/introduce/dto/IntroduceResDto.java @@ -52,8 +52,8 @@ private String formatUpdatedAt(LocalDateTime updatedAt) { private String calculateTimeUntilDeadline(LocalDateTime updatedAt, LocalDateTime deadline) { Duration duration = Duration.between(updatedAt, deadline); long days = duration.toDays(); - if (days>6){ - return days > 0 ? "D-" + days : "공고 기한 마감"; + if (days < 8 && days > 0) { + return "D-" + days; } else return null; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 536a605f..0d8607aa 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -10,7 +10,7 @@ spring.datasource.password=testPW # spring jpa spring.jpa.database=mysql spring.jpa.show-sql=true -spring.jpa.hibernate.ddl-auto=create +spring.jpa.hibernate.ddl-auto=update spring.jpa.properties.hibernate.format_sql=true