Skip to content

feat: [ALT-302] [BE·FE] 받은 대타 요청 상세 조회와 딥링크 복원 - #112

Merged
hodoon merged 5 commits into
devfrom
feat/alt-302
Oct 28, 2026
Merged

hodoon merged 5 commits into
devfrom
feat/alt-302

Conversation

@ysw789

@ysw789 ysw789 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

받은 대타 요청의 상세 API가 없어 목록 캐시 없이 새로고침·직접 URL 상태를 복원할 수 없었습니다. GET /api/app/users/me/substitute-requests/received/{requestId}를 추가했습니다.

  • 응답은 id, status, myTargetStatus, schedule, workspace, requester 여섯 필드입니다. 다른 대상자 목록·수락자·허용 행동 등 파생 필드는 노출하지 않습니다.
  • 받은 목록의 현재 ACTIVATED 근무자와 정확한 targetWorkerId 권한 선례를 사용합니다. ALL 요청도 비대상자·요청자·다른 업장에게 권한을 주지 않습니다. 퇴사 후 재입사한 새 근무자 행은 과거 행 대상 요청을 조회할 수 없습니다.
  • 조회 실패는 보낸 상세의 기존 404/B019·메시지를 재사용합니다. 보낸 상세는 User 기준으로 퇴사 후 이력을 읽을 수 있는 기존 정책을 유지하므로 두 API의 소속 정책은 동일하지 않습니다.
  • 새 유스케이스만 Actor의 User를 담은 domain command/result를 사용하며 기존 목록·보낸 상세의 시그니처와 구현은 보존했습니다. 새 migration/설정/ErrorCode는 없습니다.

검증: 기존 직접 상세 경로 404 Red 재현 → 단위/MockMvc/H2 22건 통과, ./gradlew clean build 전체542건 통과(실패·오류·skip0). 별도 localhost Spring/PostgreSQL17.2/Redis7.4.2 환경의 실제 HTTP에서 목록 호출 전 직접 상세200·최소6필드, 요청7상태와 본인 대상자 상태, ALL의 타인 수락, 권한404/400/401/403, 퇴사/재입사·보낸 이력 회귀를 확인했습니다. GET 전후 DB snapshot 두 쌍 byte cmp와 E2E 시작/종료 tracked diff 및 신규8파일 해시가 동일했습니다.

정수 ID 없는 GET /received?pageSize=20은 기존 목록200입니다. /received/는 routing404이며, 문자열 ID는400/B001, 없는/음수 numeric ID와 비대상자는404/B019입니다. 만료·비정상 대상자는 격리 SQL fixture를 사용했고 scheduler가 성공했다고 주장하지 않습니다. 실제 가상 계정만 사용했고 외부효과0, 자체 서버/컨테이너/환경·토큰파일 정리 완료입니다.

기준 dev ed0dbea. 로컬 V15 schema-only+Flyway history 환경이며 fresh V1 migration 검증은 아닙니다. 실제 브라우저 새로고침/알림 딥링크 및 배포 화면 QA는 남습니다. ALT-301과 수정 파일의 실제 겹침은 없지만 대타 조회·승인의 통합 회귀가 필요합니다. PR #105 수입 정책은 범위 밖이며 새 migration 또는 중간 브랜치 조건은 없습니다.

Notion: https://app.notion.com/p/3ef86553162881aa828be4c18c41192b

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@hodoon hodoon 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.

리뷰했습니다. 인라인 코멘트 확인 부탁드립니다.

import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "받은 대타 요청 상세 응답")
public record ReceivedSubstituteRequestDetailResponseDto(

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.

이 응답 DTO만 record로 되어 있어서, 프로젝트의 응답 DTO 컨벤션(private 생성자 + private @builder + from()/of() 팩토리)과는 조금 다른 것 같습니다. record는 canonical 생성자가 public으로 열려 있어 팩토리를 거치지 않고도 만들 수 있고, 같은 패키지의 ReceivedSubstituteRequestResponseDto도 Lombok 클래스 패턴을 쓰고 있습니다.
일관성을 위해 @Getter와 @NoArgsConstructor/@AllArgsConstructor/@builder(access = AccessLevel.PRIVATE)를 쓰는 클래스로 바꾸고, from(ReceivedSubstituteRequestDetailResult)은 그대로 두면 어떨까요? 바꾸시는 김에 필드 @Schema에 example도 함께 넣어 주시면 좋을 것 같습니다.

@hodoon hodoon self-assigned this Oct 21, 2026
record는 public 생성자가 열려 있어 팩토리 없이 생성할 수 있었다. 다른 응답 DTO와 같이
private 생성자·Builder + from() 팩토리 구조로 바꾸고 필드 example을 채운다. JSON 구조는 그대로다.
@hodoon
hodoon marked this pull request as ready for review October 28, 2026 13:34
@hodoon
hodoon merged commit 3323c9e into dev Oct 28, 2026
5 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.

2 participants