Skip to content

Feature #90 : 특정 기수의 특정 기간동안 작성한 book log의 개수를 조회하는 api 추가#93

Merged
seokhwan-an merged 8 commits intodevelopfrom
feature/add_schedule_settle_booklog
Apr 29, 2025
Merged

Feature #90 : 특정 기수의 특정 기간동안 작성한 book log의 개수를 조회하는 api 추가#93
seokhwan-an merged 8 commits intodevelopfrom
feature/add_schedule_settle_booklog

Conversation

@seokhwan-an
Copy link
Copy Markdown
Collaborator

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명(이미지 첨부 가능)

요구사항 : 일주일 마다 회원을 필수적으로 4개의 book log를 작성해야한다 -> 관리자는 해당 정보를 파악할 수 있어야 한다.

  • 특정 기간 정보를 바탕으로 특정 기수의 회원들의 book log 작성 횟수 조회 api 추가
  • 유저 기수 및 role 필드 추가

💬 작업 시 고민사항

기능을 추가하거나 수정하는 상황에서 의문이 생긴 점이나 배운점 추가

  • admin과 관련된 파일들은 어떻게 관리를 해야할지 고민입니다.
    • 현재는 admin 기능이 많지 않아서 각 domain 패키지 내부에서 파일 명칭으로 구분하는 방향을 채택
    • 기능이 많아지게 된다면 admin 패키지를 만들고 분리하는 방향을 고려

#️⃣ 연관된 이슈

연관된 이슈 번호를 모두 작성

@seokhwan-an seokhwan-an self-assigned this Apr 28, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 28, 2025

Test Results

156 tests   156 ✅  10s ⏱️
 54 suites    0 💤
 54 files      0 ❌

Results for commit bd3d86c.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Collaborator Author

@seokhwan-an seokhwan-an left a comment

Choose a reason for hiding this comment

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

작업한 코드를 보고 수정해야하는 점 체크 후 반영하기


public UserBookLogCountInWeekResponse getUserBookLogCountInWeek(final int generation, final String start, final String end) {
final LocalDateTime startDate = LocalDate.parse(start).atStartOfDay();
final LocalDateTime endDate = LocalDate.parse(end).atTime(23, 59, 59);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

현재 booklog는 마이크로 초까지 저장이 되기 때문에 endDate가 지금처럼 설정되면 23시59분59.xxxx초 에 대해서는 불러오지 못하는 문제가 될 수 있을 것 같다

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

그리고 해당 요청에서 파라미터 값 검증이 필요할 것 같습니다.

  • 기수가 음수인 경우는 없어야 한다.
  • startDate가 endDate 이하여야 한다.

Comment on lines +20 to +21
public Role convertToEntityAttribute(String s) {
if (s == null) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

파라미터 명칭을 s 대신에 의미 있는 명칭으로 수정하는 것이 좋을 것 같다.
예를 들면 roleType이 적절한 것 같다.

@seokhwan-an seokhwan-an changed the title Feature #90 : 특정 기수의 특정 기간동안 작성한 book log의 개수를 정산해주는 api 추가 Feature #90 : 특정 기수의 특정 기간동안 작성한 book log의 개수를 조회하는 api 추가 Apr 29, 2025
@seokhwan-an seokhwan-an merged commit ec5bfde into develop Apr 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 주간 특정 기수 회원이 작성한 book log 글 개수를 정산해주는 api 추가하기

1 participant