Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
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. Comment |
hodoon
approved these changes
Oct 21, 2026
hodoon
left a comment
Collaborator
There was a problem hiding this comment.
리뷰했습니다. 별도 지적 사항 없이 변경 범위와 테스트 모두 적절해 보입니다. 👍
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
공고 근무 일정의 시작 시간과 종료 시간이 같으면(0분 근무) 저장되던 문제를 고쳤습니다. 이제 공고 등록, 기존 일정 수정, 새 일정 추가에서 이런 일정이 하나라도 있으면 서버가 400
B001로 요청 전체를 거부합니다. 요청·응답 필드, DB 스키마는 바뀌지 않았고 신규 ErrorCode도 없습니다.변경 내용
근무 일정 시간 검증 (
PostingSchedule)PostingSchedule.create·update가 필드를 바꾸기 전에 시작 시간과 종료 시간이 같은지 검사합니다. 같으면CustomException(ErrorCode.ILLEGAL_ARGUMENT, "근무 시작 시간과 종료 시간은 같을 수 없습니다.")을 던집니다.POST /api/manager/postings(공고 등록,CreatePosting)schedules중 하나라도 시작·종료 시간이 같으면 400B001을 반환합니다. 나머지 일정이 정상이어도 공고와 일정은 하나도 저장되지 않습니다.PUT /api/manager/postings/{postingId}(공고 수정,ManagerUpdatePosting)updateSchedules(기존 일정 수정)나createSchedules(새 일정 추가)에 시작·종료 시간이 같은 일정이 하나라도 있으면 400B001을 반환합니다.Swagger
ManagerPostingControllerSpec의 공고 등록·수정 설명에 동일 시각 거부 규칙과 야간 일정 허용, 요청 전체 실패를 적었습니다.{"code":"B001","message":"근무 시작 시간과 종료 시간은 같을 수 없습니다."}를 추가했습니다.프론트 영향
B001과 메시지근무 시작 시간과 종료 시간은 같을 수 없습니다.가 옵니다. 오류 응답 본문은 기존 형식(timestamp,code,message,data)을 그대로 씁니다.근무 일정은 최소 1개 이상 있어야 합니다.라는B001오류도 있습니다. 화면에서 두 경우를 나눠 보여 주려면code가 아니라message로 구분해야 합니다.테스트
모두 Mockito·순수 도메인 단위 테스트입니다.
PostingScheduleTests(신규) — 00:0000:00, 09:3009:30 일정을 생성·수정할 때ILLEGAL_ARGUMENT로 거부되고, 수정이 실패하면 기존 요일·시간·포지션이 그대로인지 확인합니다. 주간 09:0018:00과 야간 22:0006:00 일정은 생성·수정 모두 그대로 저장되는지 확인합니다.CreatePostingTests— 정상 일정 사이에 동일 시각 일정이 하나 섞이면 예외가 나고 공고 저장(save)이 호출되지 않는지 확인합니다.ManagerUpdatePostingTests— 추가·수정하는 일정 중 하나가 동일 시각이면 예외가 나는지, 수정 실패 시 기존 일정 시간이 바뀌지 않는지 확인합니다. 롤백을 보장하는Transactional이 유스케이스에 붙어 있는지도 확인합니다../gradlew test619건 모두 통과했습니다(실패 0건, skip 0건). 이번 PR 관련은PostingScheduleTests6건,CreatePostingTests3건,ManagerUpdatePostingTests5건입니다.B001을 받고 DB 상태가 요청 전과 같은지 확인했습니다. 운영 코드는 그때와 같습니다.남긴 것
관련 문서
추가 반영: 다음 날 종료 규칙 확정
gteStartTime·lteEndTime)는 시각 값만 비교해서 다음 날 종료 일정을 반영하지 못합니다(예: 22:0006:00 공고가 00:0008:00 필터에 걸림). 이 PR 범위 밖입니다.