Skip to content

feat: 쿠폰 등록 이벤트 기능 구현#356

Merged
sangu1026 merged 10 commits intodevfrom
feature/buddyya-coupon-point-event#355
May 17, 2025
Merged

feat: 쿠폰 등록 이벤트 기능 구현#356
sangu1026 merged 10 commits intodevfrom
feature/buddyya-coupon-point-event#355

Conversation

@sangu1026
Copy link
Contributor

@sangu1026 sangu1026 commented May 16, 2025

📌 관련 이슈

버디야 부스 쿠폰 등록 이벤트 구현[#355]



🛠️ 작업 내용

  • Coupon 엔티티 생성
  • Coupon 코드 입력 시 쿠폰의 유효성과 사용 여부를 검사
  1. 등록되지 않은 쿠폰 코드일 경우 예외 반환
  2. 이미 사용된 쿠폰 코드일 경우 예외 반환
  • 유효한 쿠폰일 경우 포인트 업데이트 후 업데이트된 포인트와 포인트 변화 반환



🎯 리뷰 포인트



📎 커밋 범위 링크



@sangu1026 sangu1026 added this to the 이벤트 milestone May 16, 2025
@sangu1026 sangu1026 requested review from maark1106 and mangsuyo May 16, 2025 14:42
@sangu1026 sangu1026 self-assigned this May 16, 2025
@sangu1026 sangu1026 added the ✨ Feature 기능 개발 label May 16, 2025
@sangu1026 sangu1026 linked an issue May 16, 2025 that may be closed by this pull request
8 tasks
Copy link
Member

@mangsuyo mangsuyo left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!
또한, 엑셀 가변 데이터를 어떻게 Coupon DB에 저장하실지 계획을 여쭤봐도 될까요?

MISSION_CERTIFICATION_REWARD("mission_certification_reward", 100, PointChangeType.MISSION),
MISSION_VISIT_REWARD("mission_visit_reward", 10, PointChangeType.MISSION),
FESTIVAL_REWARD("festival_reward", 50, PointChangeType.EARN),
COUPON_EVENT_REWARD("event_reward", 100, PointChangeType.EARN),
Copy link
Member

Choose a reason for hiding this comment

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

P1: 다른 포인트 타입 네이밍으로 해야할 것 같네요!

Copy link
Contributor Author

@sangu1026 sangu1026 May 17, 2025

Choose a reason for hiding this comment

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

확인 후 수정하였습니다. 세세한 검토 감사드립니다!

import java.util.Optional;

public interface CouponRepository extends JpaRepository<Coupon, Long> {
Optional<Coupon> findByCode(String code);
Copy link
Member

Choose a reason for hiding this comment

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

P1: 컨벤션상 개행 필요해보입니다!

@sangu1026
Copy link
Contributor Author

고생하셨습니다! 또한, 엑셀 가변 데이터를 어떻게 Coupon DB에 저장하실지 계획을 여쭤봐도 될까요?

마이그레이션 스크립트에 작성하려고 하였으나 쿠폰의 코드가 노출 될 수 있어. 직접 스크립트를 실행하려고 합니다!

@sangu1026 sangu1026 merged commit b2567cb into dev May 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

버디야 부스 쿠폰 등록 이벤트 구현

3 participants