Skip to content

feat: 1시부터 3시 피크타임 좋아요 2배 이벤트#112

Merged
wlgns12370 merged 1 commit intomainfrom
feat/#111
Mar 16, 2026
Merged

feat: 1시부터 3시 피크타임 좋아요 2배 이벤트#112
wlgns12370 merged 1 commit intomainfrom
feat/#111

Conversation

@wlgns12370
Copy link
Contributor

@wlgns12370 wlgns12370 commented Mar 16, 2026

✨ 구현한 기능

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 부스 좋아요 기능에 이벤트 시간대별 배수 적용 기능 추가. 설정된 시간 동안 좋아요 점수를 2배로 적용 가능.
  • Bug Fixes

    • 부적절한 입력 값에 대한 예외 처리 개선으로 사용자 경험 향상.

@wlgns12370 wlgns12370 added the Ship 리뷰 없이 변경을 바로 머지하는 경우 label Mar 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

피크타임(1시~3시) 동안 좋아요 점수에 2배 배수를 적용하는 이벤트 기능이 추가되었습니다. 동시에 메서드 인자 타입 불일치 예외에 대한 전역 예외 처리기도 추가되었습니다.

Changes

Cohort / File(s) Summary
좋아요 이벤트 배수 기능
src/main/java/kr/co/knuserver/application/booth/BoothLikeService.java
더블 이벤트 기능을 위한 설정 필드 3개 추가(doubleEventEnabled, doubleEventStart, doubleEventEnd). getLikeMultiplier() 메서드를 통해 현재 Seoul 시간대를 기반으로 배수(1 또는 2) 계산. like() 메서드에서 하드코딩된 배수 1을 대체하여 동적 배수 적용.
예외 처리 개선
src/main/java/kr/co/knuserver/global/handler/GlobalExceptionHandler.java
MethodArgumentTypeMismatchException 핸들러 추가. 메서드 인자 타입 불일치 시 400 BAD_REQUEST 응답 반환.

Sequence Diagram

sequenceDiagram
    participant Client
    participant BoothLikeService
    participant Config
    participant TimeProvider as TimeProvider<br/>(Seoul TZ)

    Client->>BoothLikeService: like(boothId)
    activate BoothLikeService
    BoothLikeService->>BoothLikeService: getLikeMultiplier()
    activate BoothLikeService
    BoothLikeService->>Config: doubleEventEnabled?
    Config-->>BoothLikeService: true/false
    alt Event Enabled
        BoothLikeService->>TimeProvider: getCurrentTime(Seoul)
        TimeProvider-->>BoothLikeService: current time
        BoothLikeService->>BoothLikeService: check if within<br/>doubleEventStart~End
        alt Within Event Window
            BoothLikeService-->>BoothLikeService: return 2
        else Outside Window
            BoothLikeService-->>BoothLikeService: return 1
        end
    else Event Disabled
        BoothLikeService-->>BoothLikeService: return 1
    end
    deactivate BoothLikeService
    BoothLikeService->>BoothLikeService: score = baseScore × multiplier
    BoothLikeService-->>Client: success response
    deactivate BoothLikeService
Loading

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 한 마리 토끼, 시간 계산법을 배웠네,
1시부터 3시까지, 좋아요는 두 배!
설정과 예외도 척척 정렬되고,
이벤트 성공, 귀여운 배치 완성! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning BoothLikeService의 이벤트 기능 외에도 GlobalExceptionHandler에 MethodArgumentTypeMismatchException 처리가 추가되었으나, 이는 이슈 요구사항에 언급되지 않은 변경사항입니다. GlobalExceptionHandler 변경사항이 이슈 #111의 범위를 벗어나므로, 별도의 이슈/PR로 분리하거나 변경사항을 제거하는 것을 고려해주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR 설명이 템플릿 대비 최소한의 정보만 포함하고 있습니다. '구현한 기능' 섹션에만 이슈 참조가 있고, '논의하고 싶은 내용'과 '기타' 섹션이 비어있습니다. 더 구체적인 구현 내용, 변경사항 설명, 그리고 필요한 논의 사항들을 추가하여 설명을 보완해주세요.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 주요 내용을 명확하게 설명하고 있습니다. '1시부터 3시 피크타임 좋아요 2배 이벤트' 기능이 코드 변경과 정확히 일치합니다.
Linked Issues check ✅ Passed 변경사항이 이슈 #111의 요구사항을 충족합니다. 13시부터 15시(1시부터 3시) 동안 좋아요를 2배로 하는 이벤트 기능이 구현되었습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#111
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@wlgns12370 wlgns12370 merged commit 0a2788c into main Mar 16, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ship 리뷰 없이 변경을 바로 머지하는 경우

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[이벤트] 1시부터 3시 피크타임 좋아요 2배 이벤트

1 participant