Skip to content

[feat] #30 - TODO 조회 기본/7일#49

Merged
laura-jung merged 48 commits into
developfrom
feat/#30-getTodo
Jul 8, 2026
Merged

[feat] #30 - TODO 조회 기본/7일#49
laura-jung merged 48 commits into
developfrom
feat/#30-getTodo

Conversation

@laura-jung

@laura-jung laura-jung commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

관련 이슈 🛠

작업 내용 요약 ✏️

홈화면에서 특정 기간의 투두를 날짜별로 조회하는 API를 구현했습니다. 반복 규칙(Todo)과 실제 발생 인스턴스(TodoInstance)를 조합해 날짜별 투두 목록을 내려주며, 사용자별 시간대(zoneId)를 기준으로 "오늘"과 조회
기간을 계산합니다. 이를 위해 사용자별 시간대 설정 기능과 서버 타임스탬프의 UTC 기준 통일, 투두 조회용 엔티티 보강을 함께 포함했습니다.

주요 변경 사항 🛠️

  • 홈 조회 API: GET /home — filter(DEFAULT/WEEK)와 baseDate를 받아 날짜별 투두·공휴일·오늘 여부를 응답 (HomeController, HomeService, HomeResponse, HomeTodoMapper, HolidayChecker)
  • 사용자별 시간대 설정: zoneId 필드 및 변경 API 추가, LocalDate.now(userZone) 기준으로 오늘/조회 기간 산정
  • UTC 기준 통일: JVM·Hibernate·Jackson을 UTC로 고정, 타임스탬프를 ISO-8601(...'T'HH:mm:ss'Z')로 직렬화
  • 투두 조회용 엔티티 보강: 타이머 상태·완료 여부 등 필드 추가 (TodoInstance, TodoTimerStatus 등)

트러블 슈팅 ⚽️

  • 기존 유저 zone_id 빈 값 문제: ddl-auto: update로 NOT NULL zone_id 컬럼 추가 시 기존 행이 ''로 채워져 ZoneId.of("") → DateTimeException. → 배포 시 백필 필요:
    UPDATE user SET zone_id = 'Asia/Seoul' WHERE
    zone_id IS NULL OR zone_id = '';

  • 시간대 마이그레이션: UTC 통일 이전 KST 저장분이 있으면 별도 보정 필요.

스크린샷 📷

스크린샷 2026-07-08 오후 5 40 43

리뷰 요구사항 📢

없습니다 트러블 슈팅 내용 확인해서 에러 안나게 조심해주세요!

Summary by CodeRabbit

  • New Features

    • 홈 화면 조회 API가 추가되어 날짜별 일정, 완료 수, 휴일/오늘 여부를 확인할 수 있습니다.
    • 사용자 언어와 시간대를 변경할 수 있는 설정 기능이 추가되었습니다.
    • 인증 흐름에 토큰 재발급, 로그아웃, 회원탈퇴 기능이 확장되었습니다.
  • Bug Fixes

    • 날짜와 시간 표시가 UTC 기준으로 더 일관되게 처리되도록 개선되었습니다.
    • 할 일 하위 항목과 타이머 상태가 화면에 더 정확히 반영됩니다.

aneykrap and others added 30 commits July 8, 2026 04:08
@laura-jung laura-jung requested a review from aneykrap July 8, 2026 12:15
@github-actions github-actions Bot added ✨ feat and removed ✨ feat labels Jul 8, 2026
aneykrap
aneykrap previously approved these changes Jul 8, 2026

@aneykrap aneykrap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

리뷰 반영 확인해써여 짱짱

Jy000n
Jy000n previously approved these changes Jul 8, 2026
DEFAULT는 기준 날짜 전후 7일, WEEK는 기준 날짜부터 7일을 반환합니다.
각 날짜의 TODO는 미완료 먼저, 같은 완료 그룹 안에서는 sortOrder 오름차순으로 정렬됩니다.
""",
security = @SecurityRequirement(name = "bearerAuth")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P5) SwaggerSecurity에서 SecurityRequirement를 전역으로 설정해두어서 해당 어노테이션은 별도로 붙이지 않아도 동일하게 동작합니다!!

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.

아 그렇군요! 반영해서 수정 완료했습니다

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

제가 timer를 구현하다가 알게 된 사실인데요,, todo 엔티티의 subtask 필드가 양방향 매핑으로 되어 있는 것 같습니다! 근데 제가 기억하기로는 세미나에서 양방향 매핑은 최대한 지양하는 것이 좋다고 들었던 기억이 있는데 양방향으로 구현하신 이유가 따로 있으실까요 ??

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.

subtask는 Todo가 생명주기를 소유하는 부분이라서 cascade/orphanRemoval로 일괄 관리하려고 양방향으로 두었습니다(TODO 없이는 어차피 사라져야하는 친구들이라서요!). 동기화는 addSubtask()에서 한쪽으로만 처리하고, getter도 불변 리스트로 막아둬서 양방향의 전형적인 부작용(순환 참조, 동기화 누락)은 차단돼 있습니다.

@CreatedDate
@Column(name = "created_at", nullable = false, updatable = false)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이거 형식 혹시 UTC 때문에 바꾸신걸까용,, 그냥 궁금해서,,

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.

네 맞습니다. UTC임을 명시할 필요가 있을 것 같아서 추가했습니다!

@github-actions github-actions Bot added the slack-approval-notified Slack 승인 완료 알림 중복 방지용 라벨 label Jul 8, 2026
@laura-jung laura-jung dismissed stale reviews from Jy000n and aneykrap via a0d10aa July 8, 2026 13:37
@github-actions github-actions Bot added ✨ feat and removed ✨ feat slack-approval-notified Slack 승인 완료 알림 중복 방지용 라벨 labels Jul 8, 2026
@laura-jung laura-jung requested review from Jy000n and aneykrap July 8, 2026 13:39

@aneykrap aneykrap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

어푸푸

@Jy000n Jy000n left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

굳!!!

@github-actions github-actions Bot added slack-approval-notified Slack 승인 완료 알림 중복 방지용 라벨 ✨ feat and removed ✨ feat labels Jul 8, 2026
@laura-jung laura-jung merged commit ad628f2 into develop Jul 8, 2026
8 checks passed
@laura-jung laura-jung changed the title [feat] #30 TODO 조회 기본/7일 [feat] #30 - TODO 조회 기본/7일 Jul 8, 2026
@github-actions github-actions Bot added ✨ feat and removed ✨ feat labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat slack-approval-notified Slack 승인 완료 알림 중복 방지용 라벨 🍀 윤아

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] TODO 조회 기본/7일

3 participants