-
Notifications
You must be signed in to change notification settings - Fork 0
[DEV-224/BE] feat: 모바일 뷰에서 기록전 상태의 면접만 조회하는 API 개발 #364
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
The head ref may contain hidden characters: "DEV-224/feat/\uBAA8\uBC14\uC77C-\uBDF0\uC5D0\uC11C-\uAE30\uB85D\uC804-\uC0C1\uD0DC\uC758-\uBA74\uC811\uB9CC-\uC870\uD68C\uD558\uB294-API-\uAC1C\uBC1C"
Changes from 2 commits
d49f58e
979f7ca
a0bb76a
d236440
1d1876e
eed6c48
4b7a8df
be30e1f
4b8d92f
239ea6c
9b93bcc
5e5e6ea
33273d4
2291a61
fb8fa88
96d9a14
9391aa9
0425de7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,7 @@ | |
| import com.shyashyashya.refit.domain.user.model.User; | ||
| import com.shyashyashya.refit.global.exception.CustomException; | ||
| import com.shyashyashya.refit.global.util.RequestUserContext; | ||
| import java.time.LocalDateTime; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.function.Function; | ||
|
|
@@ -249,4 +250,13 @@ private Company findOrSaveCompany(InterviewCreateRequest request) { | |
| } | ||
| }); | ||
| } | ||
|
|
||
| public List<InterviewSimpleDto> getMyNotLoggedInterviews() { | ||
| User requestUser = requestUserContext.getRequestUser(); | ||
|
|
||
| LocalDateTime now = LocalDateTime.now(); | ||
| return interviewRepository.findInterviewsNotLoggedRecentOneMonth(requestUser, now).stream() | ||
| .map(InterviewSimpleDto::from) | ||
| .toList(); | ||
| } | ||
|
Comment on lines
+254
to
+261
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
public List<InterviewSimpleDto> getMyNotLoggedInterviews(LocalDateTime now) {
User requestUser = requestUserContext.getRequestUser();
return interviewRepository.findInterviewsNotLoggedRecentOneMonth(requestUser, now).stream()
.map(InterviewSimpleDto::from)
.toList();
}
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 피드백은 제가 담당한 Jwt Encoder에서도 적용 가능한 것 같아요. 외부 주입으로 대체하는 것은 어떻게 생각하시나요?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 저도 프로젝트하면서 이 부분이 항상 고민이었는데, AI 추천대로 컨트롤러로 빼기에는 '시간' 이라는 로직이 컨트롤러에 담기는 점이 불편하고, E2E 테스트를 할 때는 여전히 테스트가 어렵다는 문제점이 남아있어 AI 방법은 한계가 있는 것 같습니다! GPT 활용해서 조사했을 때, Clock을 빈으로 주입받은 뒤, 주입받은 clock 을 LocalDateTime 생성 시 매개변수로 넘겨서 시간을 세팅하는 로직을 제안해주었는데, 이 방법이라면 테스트도 용이하고, 서비스 계층에서 시간을 다루는 것도 그대로 유지되어 계층간 책임이 명확하게 유지된다고 보여서 저도 좋은 것 같은데 이 방법은 어떠신가요?? |
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.