Skip to content

[DABOM-509] MissionCardResponse 응답에 requestId 추가 및 조회 로직 추가 - #131

Merged
ChoiSeungeon merged 4 commits into
developfrom
feat/DABOM-509
Mar 19, 2026
Merged

ChoiSeungeon merged 4 commits into
developfrom
feat/DABOM-509

Conversation

@ChoiSeungeon

Copy link
Copy Markdown
Member

🍀 이슈 & 티켓 넘버


🎯 목적

미션 목록 카드 응답에서 진행 중인 완료 요청을 식별할 수 있도록 PENDING 상태의 MissionRequest.id를 함께 내려주기 위함

📝 변경 사항

  • MissionCardResponserequestId 필드 추가
  • 미션 목록 조회 시 requestStatus는 기존대로 유지하고, PENDING 요청의 requestId만 별도 조회하도록 분리
  • 관련 서비스/통합 테스트 검증 로직 수정

📂 변경 범위

도메인 controller service repository entity infra global
mission [x] [x]

🖥️ 주요 코드 설명

Map<Long, String> requestStatusMap = loadMissionRequestStatusMap(page);
Map<Long, Long> pendingRequestIdMap = loadPendingMissionRequestIdMap(page);

return new MissionListResult(
        page.stream()
                .map(
                        mission ->
                                toMissionCard(
                                        mission,
                                        customerNameMap,
                                        requestStatusMap,
                                        pendingRequestIdMap))
                .toList(),
        nextCursor,
        hasNext);

private Map<Long, Long> loadPendingMissionRequestIdMap(List<MissionItem> missions) {
    Set<Long> missionIds =
            missions.stream().map(MissionItem::getId).collect(Collectors.toSet());
    return missionRequestRepository
            .findByMissionItemIdInAndStatusOrderByCreatedAtDescIdDesc(
                    missionIds, MissionRequestStatus.PENDING)
            .stream()
            .collect(
                    Collectors.toMap(
                            MissionRequest::getMissionItemId,
                            MissionRequest::getId,
                            (latest, ignored) -> latest));
}

💬 리뷰어에게

미션 목록의 requestStatus는 기존 의미를 유지하고, requestId만 PENDING 요청 기준으로 추가했습니다.


📋 체크리스트

기본

  • Merge 대상 브랜치가 올바른가?
  • ./gradlew build가 정상적으로 통과하는가?
  • Spotless / Checkstyle을 통과하는가? (./gradlew spotlessApply checkstyleMain)
  • 전체 변경사항이 500줄을 넘지 않는가?

코드 품질

  • 의존성 방향을 준수하는가? (Controller → Service → Repository → Entity)
  • Setter 없이 비즈니스 메서드로 상태를 변경하는가?
  • @Transactional은 Service에만 선언했는가?

테스트

  • 신규 비즈니스 로직에 대한 단위 테스트를 작성했는가?

📌 참고 사항

@github-actions github-actions Bot added the refactor 리팩토링 label Mar 19, 2026
@github-actions
github-actions Bot requested a review from paul0755 March 19, 2026 04:29
@github-actions github-actions Bot added the size/M PR size: M label Mar 19, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 미션 목록 카드 응답의 기능을 확장하여, 진행 중인 완료 요청(PENDING 상태)을 식별할 수 있도록 MissionRequest.id를 함께 제공합니다. 이는 사용자가 미션 카드에서 요청의 고유 식별자를 직접 확인할 수 있게 하여, 특정 요청에 대한 후속 처리를 용이하게 합니다. 기존의 requestStatus 로직은 변경 없이 유지됩니다.

Highlights

  • 응답 필드 추가: 미션 카드 응답 DTO인 MissionCardResponse와 내부 모델 MissionCardrequestId 필드를 추가했습니다.
  • 미션 요청 ID 조회 로직 분리: 미션 목록 조회 시 기존 requestStatus 로직은 유지하되, PENDING 상태의 MissionRequest.id만 별도로 조회하여 응답에 포함하도록 로직을 분리했습니다.
  • 테스트 업데이트: 새로운 requestId 필드와 조회 로직에 대한 서비스 및 통합 테스트 검증 로직을 추가하고 수정했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

안녕하세요. 미션 목록 응답에 requestId를 추가하고 관련 조회 로직을 구현하신 PR 잘 보았습니다. PENDING 상태의 요청 ID를 식별할 수 있게 되어 클라이언트에서 활용도가 높아질 것 같습니다.

코드 변경 사항에 대해 몇 가지 개선점을 제안드립니다.

  1. MissionServiceImpl에서 미션 요청 상태와 ID를 가져오기 위해 두 번의 데이터베이스 조회가 발생하고 있습니다. 이를 하나의 쿼리로 통합하여 성능을 개선할 수 있습니다.
  2. MissionRequestRepository에 추가된 쿼리 메소드는 Spring Data JPA의 이름 기반 쿼리 생성 기능으로 대체할 수 있어, 코드를 더 간결하게 만들 수 있습니다.

자세한 내용은 각 파일의 인라인 코멘트를 참고해주세요. 감사합니다.

Comment thread src/main/java/com/project/domain/mission/service/MissionServiceImpl.java Outdated
Comment thread src/main/java/com/project/domain/mission/repository/MissionRequestRepository.java Outdated
@github-actions github-actions Bot added the style 코드 스타일 변경 label Mar 19, 2026
@github-actions

Copy link
Copy Markdown

SonarQube Quality Summary (Community)

Quality Gate PASSED

Branch: feat/DABOM-509
Compared to: default branch

Issues

  • 🐞 Bugs: 8
  • 🔐 Vulnerabilities: 0
  • 📎 Code Smells: 92

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=dabom-api-core&branch=feat/DABOM-509

Generated automatically by GitHub Actions.

@paul0755 paul0755 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인했습니다~

@ChoiSeungeon
ChoiSeungeon merged commit 014b81e into develop Mar 19, 2026
10 checks passed
@ChoiSeungeon
ChoiSeungeon deleted the feat/DABOM-509 branch March 19, 2026 04:45
@ChoiSeungeon ChoiSeungeon self-assigned this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩토링 size/M PR size: M style 코드 스타일 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DABOM-509] 미션 카드 응답 requestId 추가

2 participants