-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat-be: Process 관련 API 쿼리 최적화 #711
feat-be: Process 관련 API 쿼리 최적화 #711
Conversation
1727182982.605089 |
1727182983.872449 |
📌 Test Coverage Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
와우 고급 SQL 문법 쓰셨네요.
간단한 코멘트 남겼으니 확인 부탁드립니다.
수고 많으셨습니다. 👍
backend/src/main/java/com/cruru/applicant/domain/repository/ApplicantRepository.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/cruru/applicant/domain/repository/ApplicantRepository.java
Outdated
Show resolved
Hide resolved
public ApplicantCardResponse toResponse() { | ||
return new ApplicantCardResponse(id, name, createdAt, isRejected, (int) evaluationCount, averageScore); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 response 변환 로직은 facade나 service에 있는데,
이 변환 로직은 여기에 두신 이유가 궁금합니다(단순 궁금).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이전까지는 facade, service 계층에 dto가 없어서요...? 그리고 controller 패키지에서 도메인을 참조해서요.
backend/src/test/java/com/cruru/applicant/domain/repository/ApplicantRepositoryTest.java
Show resolved
Hide resolved
@@ -64,6 +64,10 @@ private Process toEvaluateProcess(ProcessCreateRequest request, Dashboard dashbo | |||
return new Process(request.sequence(), request.name(), request.description(), ProcessType.EVALUATE, dashboard); | |||
} | |||
|
|||
public List<Process> findAllByDashboard(Long dashboardId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public List<Process> findAllByDashboard(Long dashboardId) { | |
public List<Process> findAllByDashboardId(Long dashboardId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다형성을 활용하기 위해 메서드명을 같게 했습니다. System.out.printlnString() 안하는 것처럼요.
혹시 어색하게 느껴지시나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아뇨. ㅎ ㅎ 놓치신 줄 알았습니다.
다형성이 이유라면 수정하지 않아도 될 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~~! 덕분에 쿼리가 엄청나게 줄었네요. 쿼리문 사용된 기능 잘 동작하는거 확인했습니다. 변경할 사항 없는거 같아 바로 approve 드려요
assertAll( | ||
() -> assertThat(applicantCard.id()).isEqualTo(applicant.getId()), | ||
() -> assertThat(applicantCard.name()).isEqualTo(applicant.getName()), | ||
() -> assertThat(applicantCard.evaluationCount()).isEqualTo(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
() -> assertThat(applicantCard.evaluationCount()).isEqualTo(0), | |
() -> assertThat(applicantCard.evaluationCount()).isZero(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
작업 내용
참고
관련 이슈
PR 체크리스트