[FEAT] 프로젝트 목록 meetingCount 실집계 연결 + teamNames 배치 조회 추가 - #260
Merged
Conversation
ProjectSummaryResponse.actionCount/completedActionCount/progressPct가 2026-08-05부터 0 고정 스텁이었는데, action BC가 다 갖춰진 지금 실집계로 채운다. ActionQueryPort에 countActionsByProjectIds 배치 조회 신설(project→action 크로스 BC 조회, 기존 findTeamActionsByProjectId와 같은 포트 패턴) — 목록에 프로젝트가 여러 개여도 쿼리 1회로 끝낸다. ProjectPersistenceAdapter.findAllByCompanyId의 프로젝트별 개별 조회(N+1)도 같이 제거 — project_team 배정을 배치 조회 후 프로젝트 id로 메모리에서 묶는다. GetProjectListUseCase.list()는 List<Project> 대신 List<ProjectListItem> (project+실카운트)을 반환하도록 계약 변경 — GetProjectDetailUseCase의 ProjectDetailResult와 같은 패턴. meetingCount는 여전히 0(meeting Port 미비, 모성진에게 요청함). ProjectAttachmentController의 낡은 TBD 주석도 정리 — 첨부파일 목록은 이미 ProjectDetailResponse에 인라인으로 포함돼 있었다.
…ounts' into feat/mnppi-project-meeting-count
성진(D) PR #258이 제공하는 meeting.application.port.in.MeetingQueryPort. countMeetingsByProjectIds(companyId, projectIds) 계약을 project(C)가 자체 아웃바운드 포트(MeetingQueryPort)+MeetingQueryPortDelegatingAdapter로 위임 호출 — handover(E)의 MeetingQueryPortDelegatingAdapter와 동일 패턴. ProjectSummaryResponse.meetingCount가 이제 0 고정이 아니라 실제 회의 수를 반환한다(취소 회의 제외, D 계약 그대로). 이 브랜치는 develop이 아니라 PR #258(feat/mo-meetingdata)과 PR #253 (feat/mnppi-project-list-action-counts) 위에서 시작 — 두 PR이 먼저 머지돼야 이 PR도 깨끗하게 머지된다.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
📌 연관 이슈
(PR #258·#253 후속 작업 — 별도 이슈 없음)
이 PR은 develop이 아니라 PR #258(
feat/mo-meetingdata) 위에서 시작했고, PR #253(
feat/mnppi-project-list-action-counts)도 merge해서 포함하고 있습니다.#258과 #253이 먼저 develop에 머지된 뒤에, 이 PR의 베이스를 develop으로 다시 잡거나
그대로 순차 머지해주세요. base를
feat/mo-meetingdata로 잡아둔 건 성진님 PR의 새countMeetingsByProjectIds계약 없이는 컴파일이 안 되기 때문입니다.📝 작업 내용
meeting.application.port.in.MeetingQueryPort.countMeetingsByProjectIds(companyId, projectIds)계약을 project(C)가 호출project.application.port.MeetingQueryPort신설 +MeetingQueryPortDelegatingAdapter로 위임 — handover(E)의MeetingQueryPortDelegatingAdapter와 동일한 ACL 패턴(별도 빈 이름 지정 — 같은 단순 클래스명이 이미 handover에 있어서 기본 빈 이름이 충돌함)ProjectSummaryResponse.meetingCount가 더 이상 0 고정이 아니라 실제 회의 수 반환(취소 회의 제외, D 계약 그대로)ProjectSummaryResponse.teamNames배치 조회 연결 — 종호(B) 확인 회신 반영. project가 이미 소유한TeamReferenceRepository(팀 소속 검증용,team테이블 읽기전용 참조)에findTeamNames계약 추가, 목록 조회 시 전체 프로젝트의 teamIds를 한 번에 모아 배치 조회(N+1 없음) 후 id→name 매핑. 신규 크로스 도메인 호출 없음 — 기존 참조 엔티티 재사용TeamReferenceEntity.@Id에@GeneratedValue(IDENTITY)누락 수정 — 종호(B) 지적. 실제 쓰기 엔티티(B의 Team)와 ID 생성 전략이 다르면 같은team테이블에 insert하는 다른 도메인 테스트가 Hibernate 세션 충돌로 깨질 수 있음(action 도메인 참조엔티티에서 이미 겪은 문제와 동일 패턴)🖥️ 프론트엔드 연동 가이드 (API 명세)
1. 주요 엔드포인트
GET/api/projects:meetingCount가 이제 실제 값입니다(기존엔 항상 0).teamNames(부서 이름 배열, 목록 행 부서 칩 표시용) 필드가 새로 추가됐습니다.4.⚠️ 프론트엔드 참고 및 주의사항
meetingCount는 취소(CANCELED)된 회의는 제외하고 셉니다(SCHEDULED·IN_PROGRESS·DONE만 포함).teamNames는teamIds와 같은 순서로 내려갑니다. 생성/수정 직후 응답(POST/PATCH)에는 빈 배열로 옵니다 — 목록 조회(GET /api/projects)에서만 채워집니다.💡 백엔드 리뷰 포인트 (Backend Review)
TeamReferenceEntity)로 처리해 크로스 도메인 애플리케이션 계층 호출 자체가 없습니다(BC 경계 그대로 유지).findAllByIdInAndCompanyId재사용이라 리스크가 낮습니다.✅ 체크리스트