Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the love point feature, which rewards users with love points based on their running distance. Key changes include adding a new love point domain and repository, integrating love point processing into user registration and rewards flows, and updating tests to validate proper love point awarding.
Reviewed Changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/org/runimo/runimo/user/api/UserItemAcceptanceTest.java | Added SQL setup for love point related tests in user API acceptance. |
| src/test/java/org/runimo/runimo/rewards/service/RewardServiceTest.java | Injected and mocked love point grant service for reward testing. |
| src/test/java/org/runimo/runimo/rewards/api/RewardAcceptanceTest.java | Added acceptance tests to verify love point reward behavior. |
| src/test/java/org/runimo/runimo/CleanUpUtil.java | Updated cleanup to include the love point table. |
| src/main/java/org/runimo/runimo/user/service/usecases/UserRegisterService.java | Integrated creation of love point during user registration. |
| src/main/java/org/runimo/runimo/user/service/UserFinder.java | Added love point finding logic. |
| src/main/java/org/runimo/runimo/user/service/UserCreator.java | Added method to create a love point instance upon user creation. |
| src/main/java/org/runimo/runimo/user/service/LovePointProcessor.java | New processor to update love points with pessimistic locking. |
| src/main/java/org/runimo/runimo/user/repository/LovePointRepository.java | Created repository for love point persistence with locking hints. |
| src/main/java/org/runimo/runimo/user/domain/LovePoint.java | Domain class for love points including add/subtract methods. |
| src/main/java/org/runimo/runimo/rewards/service/lovepoint/LoveGrantService.java | Implements love point granting based on running distance. |
| src/main/java/org/runimo/runimo/rewards/service/dtos/RewardResponse.java | Extended reward response to include love point amount. |
| src/main/java/org/runimo/runimo/rewards/service/RewardService.java | Integrated love point awarding into the reward claiming logic. |
| src/main/java/org/runimo/runimo/item/domain/Egg.java | Added discriminator value for Egg. |
| src/main/java/org/runimo/runimo/common/scale/Distance.java | Added arithmetic for distance division which is used to calculate rewards. |
| src/main/java/org/runimo/runimo/common/GlobalConsts.java | Defined distance unit constant used in love point calculations. |
Files not reviewed (3)
- src/main/resources/sql/schema.sql: Language not supported
- src/test/resources/sql/schema.sql: Language not supported
- src/test/resources/sql/user_item_test_data.sql: Language not supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 내역
애정 포인트 기능 개발
테스트