Skip to content

Comments

fix(#140): 캠페인 정보 조회에 dday, 카테고리 추가#346

Merged
ParkJiYeoung8297 merged 2 commits intodevfrom
fix/#140-get-my-campaign
Feb 9, 2026
Merged

fix(#140): 캠페인 정보 조회에 dday, 카테고리 추가#346
ParkJiYeoung8297 merged 2 commits intodevfrom
fix/#140-get-my-campaign

Conversation

@ParkJiYeoung8297
Copy link
Contributor

@ParkJiYeoung8297 ParkJiYeoung8297 commented Feb 9, 2026

Summary

캠페인 상세 정보 조회에 dday, 카테고리 추가

Changes

  • 캠페인 정보 조회에 dday, 카테고리 추가

Type of Change

  • Bug fix (기존 기능에 영향을 주지 않는 버그 수정)
  • New feature (기존 기능에 영향을 주지 않는 새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 수정)
  • Refactoring (기능 변경 없는 코드 개선)
  • Documentation (문서 수정)
  • Chore (빌드, 설정 등 기타 변경)
  • Release (develop → main 배포)

Related Issues

#140

참고 사항

dday 가 -1인것은 이미 dday가 지난 캠페인을 의미합니다.
캠페인의 카테고리는 현재 브랜드의 카테고리를 따라가고 있습니다. (데모데이 이후 캠페인의 카테고리로 변경 예정)

@ParkJiYeoung8297 ParkJiYeoung8297 self-assigned this Feb 9, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ParkJiYeoung8297, 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은 캠페인 상세 정보 조회 시 사용자에게 모집 마감까지 남은 기간('dday')과 캠페인의 카테고리 정보를 제공하여, 캠페인에 대한 이해도를 높이고 사용자 경험을 개선하는 것을 목표로 합니다. 기존 캠페인 상세 조회 기능에 누락되었던 핵심 정보를 추가하여 기능의 완전성을 확보합니다.

Highlights

  • 캠페인 상세 조회 응답 개선: 캠페인 상세 정보 조회 응답(CampaignDetailResponse)에 모집 마감까지 남은 일수를 나타내는 'dday' 필드와 캠페인의 카테고리를 나타내는 'category' 필드를 추가했습니다.
  • dday 및 카테고리 계산 로직 추가: CampaignDetailResponse의 'from' 팩토리 메서드에서 현재 날짜를 기준으로 'dday'를 계산하고, 캠페인에 연결된 브랜드의 산업 유형(IndustryType)을 'category'로 설정하는 로직을 구현했습니다. 'dday'는 모집 마감일이 지난 경우 -1로 표시됩니다.
  • API 문서 업데이트: 캠페인 상세 조회 API의 설명을 업데이트하여 새로 추가된 'dday'와 'category' 필드에 대한 정보를 명시했습니다.
Changelog
  • src/main/java/com/example/RealMatch/campaign/application/service/CampaignQueryService.java
    • java.time.LocalDate 임포트 추가
    • getCampaignDetail 메서드에서 CampaignDetailResponse.from 호출 시 현재 날짜(LocalDate.now())를 인자로 전달하도록 수정
  • src/main/java/com/example/RealMatch/campaign/presentation/controller/CampaignController.java
    • getCampaignDetail API의 @operation description에 dday 및 카테고리 필드에 대한 설명 추가
  • src/main/java/com/example/RealMatch/campaign/presentation/dto/response/CampaignDetailResponse.java
    • java.time.temporal.ChronoUnit 및 com.example.RealMatch.brand.domain.entity.enums.IndustryType 임포트 추가
    • CampaignDetailResponse 클래스에 private IndustryType category 필드 추가
    • CampaignDetailResponse 클래스에 private int dday 필드 추가
    • from 팩토리 메서드에 LocalDate today 파라미터 추가
    • from 팩토리 메서드 내에서 ChronoUnit.DAYS.between을 사용하여 dday 계산 로직 추가
    • builder를 통해 category 필드를 campaign.getBrand().getIndustryType()으로 설정
    • builder를 통해 dday 필드를 Math.max(dday, -1)로 설정하여 마감일이 지난 경우 -1로 처리
Activity
  • ParkJiYeoung8297 님이 'fix([FEAT] 나의 캠페인 조회 페이징 추가 #140): 캠페인 정보 조회에 dday, 카테고리 추가' 제목으로 풀 리퀘스트를 생성했습니다.
  • 풀 리퀘스트는 캠페인 상세 조회 응답에 dday와 카테고리 정보를 추가하는 변경 사항을 포함합니다.
  • PR 본문에는 변경 사항에 대한 구체적인 설명은 없으나, 'Bug fix' 타입으로 분류되어 있습니다.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link
Contributor

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

Choose a reason for hiding this comment

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

Code Review

이번 PR은 캠페인 상세 정보 조회 시 D-day와 카테고리 정보를 추가하는 변경 사항을 담고 있습니다. 기능 추가는 잘 이루어졌습니다. 서버의 시간대 설정에 따라 D-day 계산에 잠재적인 문제가 발생할 수 있어 시간대를 명시하는 방안을 제안합니다. 또한 API 문서의 작은 오타를 수정하여 명확성을 높이는 것이 좋겠습니다. 자세한 내용은 각 파일의 주석을 참고해주세요.

String imageUrl = attachmentUrlService.getAccessUrl(campaign.getImageUrl());

return CampaignDetailResponse.from(campaign, imageUrl, isLike, tags);
LocalDate today = LocalDate.now();
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

서버의 기본 시간대에 따라 LocalDate.now()의 결과가 달라질 수 있어 예기치 않은 동작을 유발할 수 있습니다. 예를 들어, 서버가 다른 시간대에 배포될 경우 D-day 계산이 달라질 수 있습니다. ZoneId를 명시하여 일관된 시간대를 사용하도록 수정하는 것을 권장합니다. java.time.ZoneId import가 필요할 수 있습니다.

Suggested change
LocalDate today = LocalDate.now();
LocalDate today = LocalDate.now(ZoneId.of("Asia/Seoul"));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정 완료

@ParkJiYeoung8297 ParkJiYeoung8297 merged commit 20948ea into dev Feb 9, 2026
1 check passed
@ParkJiYeoung8297 ParkJiYeoung8297 deleted the fix/#140-get-my-campaign branch February 9, 2026 15:25
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.

1 participant