Skip to content

Refactor/KD-55 GraduationUser 상세 조회 API가 졸업 상태를 포함하도록 수정#299

Merged
JangYeongHu merged 7 commits intodevelopfrom
refactor/KD-55
Dec 23, 2025
Merged

Refactor/KD-55 GraduationUser 상세 조회 API가 졸업 상태를 포함하도록 수정#299
JangYeongHu merged 7 commits intodevelopfrom
refactor/KD-55

Conversation

@JangYeongHu
Copy link
Copy Markdown
Contributor

Summary

GraduationUserDetailResponse가 졸업 상태 정보를 포함하도록 상세 조회 API를 수정합니다.

Tasks

  • GraduationUserDetailResponse가 졸업 상태 정보를 포함하도록 상세 조회 API를 수정
  • data.sql, schema.sql의 오류를 수정

@JangYeongHu JangYeongHu self-assigned this Dec 21, 2025
@JangYeongHu JangYeongHu added the 🔨refactor refactoring code label Dec 21, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 21, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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.

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

Walkthrough

졸업 사용자의 상태 정보를 응답에 포함시키기 위해 GraduationUserAdminFacade에서 GraduationUserStatusResponse를 생성하고, GraduationUserDetailResponse에 status 필드를 추가했습니다. 동시에 데이터베이스 스키마에 capstone_completion 컬럼을 추가하고 관련 데이터를 업데이트했습니다.

Changes

응집(Cohort) / 파일(File(s)) 변경 요약
졸업 사용자 응답 처리
aics-admin/src/main/java/kgu/developers/admin/graduationUser/application/GraduationUserAdminFacade.java, aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserDetailResponse.java
getGraduationUserById에서 buildSubmissionStatus 헬퍼를 통해 GraduationUserStatusResponse를 생성하고, GraduationUserDetailResponse.from()에 status 파라미터를 추가하여 응답에 상태 정보를 포함시킵니다.
졸업 사용자 요약 응답
aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryResponse.java
정적 팩토리 메서드의 파라미터 목록을 여러 줄로 재포맷하되 기능적 변경은 없습니다.
데이터베이스 스키마 및 데이터
aics-api/src/main/resources/db/schema.sql, aics-api/src/main/resources/db/data.sql
graduation_user 테이블에 capstone_completion 컬럼을 추가하고, 데이터 INSERT 문을 갱신하여 각 행의 capstone_completion 값(true/false)과 graduation_date를 반영합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

추가 주의 영역:

  • GraduationUserAdminFacadebuildSubmissionStatus 헬퍼 메서드 로직이 올바르게 상태를 구성하는지 확인
  • GraduationUserDetailResponse.from() 메서드의 새로운 status 파라미터 통합이 기존 호출 지점과 호환되는지 검증
  • 데이터베이스 schema.sql과 data.sql의 capstone_completion 컬럼 추가가 일관성 있게 적용되었는지 확인

Possibly related issues

Possibly related PRs

Suggested reviewers

  • dkdltm221
  • LeeHanEum

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 내용의 주요 목표와 일치합니다. GraduationUserDetailResponse에 졸업 상태 정보를 포함시키는 것이 핵심 변경 사항이며, 제목이 이를 명확하게 반영합니다.
Description check ✅ Passed PR 설명이 변경 사항과 관련이 있으며, 졸업 상태 정보 추가 및 data.sql, schema.sql 수정이라는 구체적인 작업을 언급합니다.

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 21, 2025

Test Coverage Report

Overall Project 80.66% -0.57% 🍏
Files changed 77.22% 🍏

Module Coverage
aics-admin 90.76% -2.6% 🍏
aics-domain 75.69% 🍏
Files
Module File Coverage
aics-admin GraduationUserAdminFacade.java 84.29% -5.44% 🍏
aics-domain GraduationUserCommandService.java 95.24% 🍏
ThesisQueryService.java 0% 🍏
CertificateQueryService.java 0% 🍏

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 21, 2025

Codecov Report

❌ Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ionUser/application/GraduationUserAdminFacade.java 62.50% 3 Missing and 3 partials ⚠️

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #299      +/-   ##
=============================================
- Coverage      86.56%   86.51%   -0.06%     
  Complexity        67       67              
=============================================
  Files             24       24              
  Lines            268      267       -1     
  Branches          17       14       -3     
=============================================
- Hits             232      231       -1     
- Misses            21       24       +3     
+ Partials          15       12       -3     
Files with missing lines Coverage Δ Complexity Δ
...ionUser/application/GraduationUserAdminFacade.java 77.33% <62.50%> (-0.30%) 16.00 <3.00> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 890ad2b...f0129e7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserDetailResponse.java (1)

57-67: graduationDate가 null일 경우 NPE 발생 가능성이 있습니다.

스키마에서 graduation_date는 nullable 컬럼입니다. graduationUser.getGraduationDate()가 null인 경우 .format(formatter) 호출 시 NullPointerException이 발생할 수 있습니다.

🔎 제안된 수정
     public static GraduationUserDetailResponse from(
         GraduationUser graduationUser,
         GraduationUserStatusResponse status
     ) {
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
         return GraduationUserDetailResponse.builder()
             .graduationUserId(graduationUser.getId())
             .name(graduationUser.getName())
             .studentId(graduationUser.getUserId())
-            .graduationDate(graduationUser.getGraduationDate().format(formatter))
+            .graduationDate(graduationUser.getGraduationDate() != null 
+                ? graduationUser.getGraduationDate().format(formatter) 
+                : null)
             .advisor(graduationUser.getAdvisorProfessor())
             .major(graduationUser.getDepartment())
             .capstoneCompletion(graduationUser.getCapstoneCompletion())
             .status(status)
             .build();
     }
🧹 Nitpick comments (2)
aics-admin/src/main/java/kgu/developers/admin/graduationUser/application/GraduationUserAdminFacade.java (2)

104-111: 변수 네이밍 일관성 개선을 권장합니다.

midThesisapproval은 camelCase 컨벤션에 맞게 midThesisApproval로 변경하는 것이 좋습니다.

🔎 제안된 수정
-        boolean midThesisapproval = false;
+        boolean midThesisApproval = false;
         if(midThesisSubmitted) {
-            midThesisapproval = thesisQueryService.isApproved(middleThesisId);
+            midThesisApproval = thesisQueryService.isApproved(middleThesisId);
         }

         GraduationUserStatusResponse.Thesis.Middle midStatus =
-                new GraduationUserStatusResponse.Thesis.Middle(midThesisSubmitted,midThesisapproval);
+                new GraduationUserStatusResponse.Thesis.Middle(midThesisSubmitted, midThesisApproval);

113-120: 변수 네이밍 일관성 개선을 권장합니다.

finalThesisapproval도 동일하게 finalThesisApproval로 변경하는 것이 좋습니다.

🔎 제안된 수정
-        boolean finalThesisapproval = false;
+        boolean finalThesisApproval = false;
         if(finalThesisSubmitted) {
-            finalThesisapproval = thesisQueryService.isApproved(finalThesisId);
+            finalThesisApproval = thesisQueryService.isApproved(finalThesisId);
         }

         GraduationUserStatusResponse.Thesis.Final finalStatus =
-                new GraduationUserStatusResponse.Thesis.Final(finalThesisSubmitted,finalThesisapproval);
+                new GraduationUserStatusResponse.Thesis.Final(finalThesisSubmitted, finalThesisApproval);
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ba321f and ffe7664.

📒 Files selected for processing (5)
  • aics-admin/src/main/java/kgu/developers/admin/graduationUser/application/GraduationUserAdminFacade.java (1 hunks)
  • aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserDetailResponse.java (2 hunks)
  • aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryResponse.java (1 hunks)
  • aics-api/src/main/resources/db/data.sql (1 hunks)
  • aics-api/src/main/resources/db/schema.sql (1 hunks)
🔇 Additional comments (4)
aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryResponse.java (1)

47-61: LGTM!

파라미터 포맷팅 변경으로 가독성이 향상되었습니다. 팩토리 메서드 로직은 정확합니다.

aics-api/src/main/resources/db/schema.sql (1)

159-159: LGTM!

capstone_completion 컬럼 추가가 올바르게 되었습니다. 다른 선택적 필드들과 동일하게 nullable로 설정되어 있어 기존 데이터와의 호환성이 유지됩니다.

aics-admin/src/main/java/kgu/developers/admin/graduationUser/application/GraduationUserAdminFacade.java (1)

130-134: LGTM!

상세 조회 시 졸업 상태 정보를 포함하도록 올바르게 수정되었습니다. buildSubmissionStatus 헬퍼 메서드를 재사용하여 코드 중복을 방지한 점이 좋습니다.

aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserDetailResponse.java (1)

34-51: LGTM!

capstoneCompletionstatus 필드 추가가 올바르게 되었습니다. Schema 어노테이션의 예시도 상세하게 작성되어 API 문서화에 도움이 됩니다.

Copy link
Copy Markdown
Contributor

@dkdltm221 dkdltm221 left a comment

Choose a reason for hiding this comment

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

문제 없어보입니다 고생하셨어요 👍

Copy link
Copy Markdown
Contributor

@dkdltm221 dkdltm221 left a comment

Choose a reason for hiding this comment

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

논문,자격증 조회 서비스 수정하신 코드가 제거와 동일해서 충돌 생기는 부분만 잘해결해주시면 될거같습니다. 고생하셨어요!

@JangYeongHu JangYeongHu merged commit d68ebaa into develop Dec 23, 2025
5 checks passed
@JangYeongHu JangYeongHu deleted the refactor/KD-55 branch December 23, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨refactor refactoring code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants