Skip to content

feat(configuration): 일정 일괄 수정 API가 여러 일정을 받도록 변경 #133 - #134

Merged
kusuri12-09 merged 1 commit into
developfrom
feature/133-schedule-bulk-update
Sep 10, 2026
Merged

feat(configuration): 일정 일괄 수정 API가 여러 일정을 받도록 변경 #133#134
kusuri12-09 merged 1 commit into
developfrom
feature/133-schedule-bulk-update

Conversation

@tlgms

@tlgms tlgms commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • PATCH /api/schedule/v11/schedules/bulk 이 이름대로 여러 일정을 한 요청으로 수정한다.

Related Issue

Current vs Improved

Before — 단건만 받고, N개 수정하려면 N번 호출 (중간 실패 시 부분 반영)

{ "title": "원서 접수", "startAt": { ... }, "endAt": { ... } }

After — 배열로 받고 한 트랜잭션에서 전부 처리

[
  { "title": "원서 접수", "startAt": { ... }, "endAt": { ... } },
  { "title": "1차 발표",  "startAt": { ... }, "endAt": { ... } }
]

응답 data 도 같은 순서의 배열이 된다. 경로·인증(ADMIN)·날짜 객체 형식·dayOfWeek 검증은 그대로.

Implementation

  • ScheduleUseCase.update(title, startAt, endAt)updateAll(schedules: List<Schedule>): List<Schedule>. 어댑터 DTO 대신 이미 있는 도메인 Schedule 을 그대로 파라미터로 쓴다.
  • ScheduleService.updateAll 은 기존 @Transactional 안에서 제목별로 조회·저장하므로, 하나라도 없으면 SCHEDULE_NOT_FOUND(404) 로 전체 롤백된다.
  • 컨트롤러에서 빈 배열은 INVALID_REQUEST_PARAM(400).
  • 제목별 단건 조회라 요청 개수만큼 쿼리가 나간다. 연간 일정이 수십 건 수준이라 감수했고, 코드에 ponytail: 주석으로 findAllByTitleIn 승급 경로를 남겼다.

Impact

  • 왕복 N → 1, 부분 반영 상태 제거.
  • 경로 이름과 실제 동작이 일치.

Testing

  • Unit tests — bazel test //systems/configuration/... 14/14 통과
    • 여러 일정 동시 수정, 빈 배열 400, 시작>종료 400, 요일 불일치 400, 없는 제목 시 중단
  • Manual verification

Risk

  • Breaking change: 요청/응답 바디가 객체 → 배열. 프론트 배포와 순서를 맞춰야 한다 (백엔드 먼저 나가면 기존 프론트 요청이 400). 단건 수정은 원소 1개짜리 배열로 보내면 된다.
  • 같은 제목을 한 요청에 두 번 넣으면 뒤엣것이 이긴다. 별도 검증은 넣지 않았다.

Checklist

  • No functional behavior change (unless intended) — 의도된 계약 변경
  • Metrics / benchmarks updated if applicable

🤖 Generated with Claude Code

/schedules/bulk 이 단건만 받던 것을 배열 요청으로 바꾸고, 한 트랜잭션에서
전부 수정하도록 ScheduleUseCase.update 를 updateAll 로 교체한다.
제목이 하나라도 없으면 404 로 전체 롤백하고, 빈 배열은 400 으로 거부한다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ready-for-review
🚫 Excluded labels (none allowed) (2)
  • wip
  • do-not-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 9d339c6e-a388-453c-b785-44ac830b5f7c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kusuri12-09
kusuri12-09 merged commit 3e3e915 into develop Sep 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PATCH /api/schedule/v11/schedules/bulk 이 실제로 여러 일정을 받도록 개선

2 participants