Skip to content

Feature/#8 프로젝트 등록현황 조회 api 구현#75

Open
pykido wants to merge 4 commits intodevelopfrom
Feature/#8-프로젝트_등록현황_조회_API_구현

Hidden character warning

The head ref may contain hidden characters: "Feature/#8-\ud504\ub85c\uc81d\ud2b8_\ub4f1\ub85d\ud604\ud669_\uc870\ud68c_API_\uad6c\ud604"
Open

Feature/#8 프로젝트 등록현황 조회 api 구현#75
pykido wants to merge 4 commits intodevelopfrom
Feature/#8-프로젝트_등록현황_조회_API_구현

Conversation

@pykido
Copy link
Contributor

@pykido pykido commented Feb 17, 2026

🔥 연관된 이슈

close: #8

📜 작업 내용

1. 프로젝트 등록 현황 조회 API를 개발하였습니다.

스크린샷 2025-11-25 오후 6 49 48
  • 특정 대회에 속한 팀들의 팀명, 작품명, 트랙명, 제출 여부를 조회할 수 있습니다.
  • teamId 기준 오름차순으로 정렬됩니다.

2. 이전 PR(Feature/#9 10 대회 투표 현황 조회 api 개발) 리뷰를 반영하였습니다.

  • Repository용 DTO(TeamSubmissionResult)를 dao 패키지에 분리하여 계층 간 의존을 방지하였습니다.

💬 리뷰 요구사항

  • TeamSubmissionResult의 필드가 ContestSubmissionResponse와 1:1 대응됩니다. Repository용 dto를 생성함에 따라 계층 분리를 위해 별도로 두었는데, 이런 식으로 분리하는 게 적절한지 의견 부탁드립니다-!

✨ 기타

  • 항상 좋은 리뷰 감사드립니다!

@pykido pykido self-assigned this Feb 17, 2026
@pykido pykido added the ⭐️ 기능 구현 새로운 기능을 구현 label Feb 17, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements an API endpoint to retrieve project submission status for teams in a contest. The implementation addresses previous feedback from PR #74 by properly separating repository-layer DTOs from application-layer DTOs.

Changes:

  • Added project submission status query API endpoint (GET /contests/{contestId}/submissions) with admin-only access
  • Introduced repository DTO pattern with TeamSubmissionResult in the dao package for clean layer separation
  • Added submit() method to Team entity for test fixture support

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TeamRepository.java Added JPQL query with LEFT JOIN to fetch team submission data including optional track information
TeamSubmissionResult.java Repository-layer DTO for JPQL projection results
ContestSubmissionResponse.java API response DTO with static factory method to convert from repository DTO
TeamQueryService.java Service method that validates contest existence and transforms repository results to response DTOs
ContestController.java Admin-restricted endpoint to retrieve team submission status
Team.java Added submit() method to support test fixtures
TeamQueryServiceTest.java Integration tests covering success, empty list, and exception cases
ContestApiDocsTest.java API documentation tests with success and failure scenarios
TeamFixture.java Test fixture for creating submitted teams
contest.adoc API documentation for the new endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@JJimini JJimini left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~! 간단한 코멘트 남겨두었으니 확인 부탁드릴게요!

Comment on lines +177 to +182
@Secured("ROLE_관리자")
@GetMapping("/{contestId}/submissions")
public ResponseEntity<List<ContestSubmissionResponse>> getTeamSubmissions(@PathVariable final Long contestId) {
final List<ContestSubmissionResponse> responses = teamQueryService.getTeamSubmissions(contestId);
return ResponseEntity.ok(responses);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 부분 회의 때 언급하려고 했었는데, getMemberVoteCount와 같이 ControllerContest, ServiceTeamQuery에 적힌 부분이 어색해 보여요!

이전의 저의 리뷰의 의도는 ControllerService 모두 contest로 옮기자라는 뜻이었는데 제가 체크를 다 못하고 approve가 된 것 같습니다..!

그래서 현재 ContestControllerTeamQueryService가 연결돼 있는 것 같습니다. 모듈 간 경계가 모호해진 것 같아요!

저는 MVP때처럼 진행중인 팀의 현황만 조회하는 것이 아닌, 대회별 팀 현황 조회가 가능한 상황이니 의미를 살려 대회의 (팀 별)프로젝트 제출 현황 조회라는 의미로 contest모듈에 위치하는 것은 어떨까 생각합니다

Comment on lines +18 to +24
@Query("SELECT new com.opus.opus.modules.team.domain.dao.TeamSubmissionResult(" +
"team.id, team.teamName, team.projectName, track.trackName, team.isSubmitted) " +
"FROM Team team " +
"LEFT JOIN ContestTrack track ON team.trackId = track.id " +
"WHERE team.contestId = :contestId " +
"ORDER BY team.id ASC")
List<TeamSubmissionResult> findTeamSubmissionsByContestId(final Long contestId);
Copy link
Collaborator

@JJimini JJimini Feb 20, 2026

Choose a reason for hiding this comment

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

대회 투표 현황 조회와 비슷하게 구현 해주신 것 같아요!

저는 투표 현황 조회에서 DAO(조회 결과)를 반환하는 이유는 DB가 계산한 조회 결과(count)를 제공하기 때문이라고 생각했습니다.

해당 API는 단순 조회처럼 보이는데 DAO를 반환하는 이유가 있을까요?
다른 조회 API들과 구현 방식이 상이하다면, DAO의 반환 기준을 명확히 정의하는 것이 좋을 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⭐️ 기능 구현 새로운 기능을 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 관리자페이지 - 프로젝트 등록현황 조회 API 구현

2 participants

Comments