Skip to content

#144 [Feat] 크레딧 적립/소비 로직 고도화#170

Merged
Dante0922 merged 2 commits intodevfrom
feat/#144
Apr 14, 2026
Merged

#144 [Feat] 크레딧 적립/소비 로직 고도화#170
Dante0922 merged 2 commits intodevfrom
feat/#144

Conversation

@Dante0922
Copy link
Copy Markdown
Contributor

작업 내용

  • User.credit 캐시 컬럼 기반으로 크레딧 잔액 조회/증감 로직 반영
  • 배틀 참여 보상, 다수결 보상, 베댓 보상, 주간 자동 충전 배치 추가
  • /api/v1/me/credits/history API 및 관련 문서 추가
  • 크레딧/배치/투표 보상 관련 테스트 보강

정책 반영

  • 다수결 보상: 14~20일 전 배틀 기준 승수 옵션 투표자 지급
  • 베댓 보상: 14~20일 전 배틀 기준 좋아요 상위 3개, 각 10개 이상 좋아요일 때 지급
  • 주간 충전: 매주 월요일 00:00 활성 사용자 지급

검증

  • sh gradlew test --no-daemon

Closes #144

@Dante0922 Dante0922 self-assigned this Apr 13, 2026
@Dante0922 Dante0922 added the ✨ Feat (기능 추가) 새로운 기능을 추가할 때 사용합니다. label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@si-zero si-zero left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 🥹

Optional<User> findTopByOrderByIdDesc();
boolean existsByUserTag(String userTag);

@Query("select u.credit from User u where u.id = :id")
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.

@Query, @Modifying 어노테이션 궁금해서 찾아봤는데, 신기하네요.
또, 하나 배워갑니다.

@Dante0922 Dante0922 merged commit 63e9116 into dev Apr 14, 2026
@Dante0922 Dante0922 deleted the feat/#144 branch April 14, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat (기능 추가) 새로운 기능을 추가할 때 사용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Feat: Credit 적립/소비 로직 고도화

2 participants