Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#264 [feat]지원서 상세보기 applicationInfo 에 등록일, 만료일 추가 #265

Merged
merged 6 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public HairModelApplication(Model model, HairLength hairLength, String hairDetai
this.applicationCaptureUrl = applicationCaptureUrl;
}

public LocalDate getCreateDate(){
public LocalDate getCreatedDate(){
LocalDate createDate = getCreatedAt().toLocalDate();
return createDate;
}
public LocalDate getExpireDate(){
public LocalDate getExpiredDate(){
LocalDate expiredDate = getCreatedAt().plusDays(7).toLocalDate();
return expiredDate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -43,6 +42,7 @@ public class HairModelApplicationRetrieveService {
private final S3Service s3Service;
private final PreferHairStyleJpaRepository preferHairStyleJpaRepository;
private final HairServiceRecordJpaRepository hairServiceRecordJpaRepository;
private final String dateFormat = "yyyy. MM. dd.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2
보통 자바에서 상수를 만들 때는 UPPER_SNAKE_CASE 형식을 자주 사용하며
private final이 아닌 private static final 을 통해 정의하곤 합니다.
수정을 하면서 final과 static final 에 대해서 알아보면 좋을 것 같습니다!


public DesignerMainResponse getDesignerMainInfo(final Long designerId, final int page, final int size) {

Expand Down Expand Up @@ -98,8 +98,8 @@ public ApplicationDto getApplicationDetailInfo(final Long applicationId) {
recordResponseList,
hairModelApplication.getHairDetail(),
hairModelApplication.getInstagramId(),
hairModelApplication.getCreateDate().format(DateTimeFormatter.ofPattern("yyyy. MM. dd.")),
hairModelApplication.getExpireDate().format(DateTimeFormatter.ofPattern("yyyy. MM. dd.")));
hairModelApplication.getCreatedDate().format(DateTimeFormatter.ofPattern(dateFormat)),
hairModelApplication.getExpiredDate().format(DateTimeFormatter.ofPattern(dateFormat)));
}


Expand Down
Loading