Skip to content

fix: 할인 알림 설정 방식을 직접 가격 입력에서 할인율 선택으로 변경#165

Merged
kangcheolung merged 1 commit intodevelopfrom
fix/163
Feb 19, 2026
Merged

fix: 할인 알림 설정 방식을 직접 가격 입력에서 할인율 선택으로 변경#165
kangcheolung merged 1 commit intodevelopfrom
fix/163

Conversation

@kangcheolung
Copy link
Copy Markdown
Member

@kangcheolung kangcheolung commented Feb 19, 2026

🔍️ 작업 내용

  • Closes #
    할인 알림 설정 방식을 직접 가격 입력에서 할인율 선택으로 변경

✨ 상세 설명

  • PriceAlertRequest: targetPrice → discountRate (10/20/30/40%)
  • PriceAlertService: 상품 현재가 기반으로 targetPrice 계산 후 저장

🛠️ 추후 리팩토링 및 고도화 계획

📸 스크린샷 (선택)

💬 리뷰 요구사항

Summary by CodeRabbit

새로운 기능

  • 가격 경고 설정이 목표 가격 기반에서 할인율 기반으로 변경되었습니다.
  • 10%, 20%, 30%, 40% 중 원하는 할인율을 선택하여 가격 경고를 생성할 수 있습니다.
  • 설정된 할인율에 따라 자동으로 목표 가격이 계산됩니다.

- PriceAlertRequest: targetPrice → discountRate (10/20/30/40%)
- PriceAlertService: 상품 현재가 기반으로 targetPrice 계산 후 저장

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

가격 알림 생성 방식을 변경했습니다. 기존 목표 가격 직접 입력에서 할인율 기반 접근 방식으로 전환되었습니다. 요청 DTO는 목표 가격 대신 할인율(10/20/30/40 중 선택)을 받으며, 서비스 레이어에서 현재 상품 가격에 할인율을 적용하여 실제 목표 가격을 계산합니다.

Changes

Cohort / File(s) Summary
Price Alert Request DTO
src/main/java/com/ongil/backend/domain/pricealert/dto/request/PriceAlertRequest.java
필드 targetPricediscountRate로 변경. NotNull 메시지 업데이트, @Positive 제약 제거, allowableValues {"10","20","30","40"} 추가.
Price Alert Service Logic
src/main/java/com/ongil/backend/domain/pricealert/service/PriceAlertService.java
targetPrice를 요청값에서 직접 사용하는 대신 product.getPrice() * (100 - request.getDiscountRate()) / 100 공식으로 계산하여 적용.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/163

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.

@kangcheolung kangcheolung merged commit 5cb3e31 into develop Feb 19, 2026
1 check was pending
@kangcheolung kangcheolung changed the title feat: 할인 알림 설정 방식을 직접 가격 입력에서 할인율 선택으로 변경 fix: 할인 알림 설정 방식을 직접 가격 입력에서 할인율 선택으로 변경 Feb 19, 2026
@kangcheolung kangcheolung added the 🐞 Fix 버그 수정 label Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Fix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant