Skip to content

[Feat/hatch egg]#10

Merged
ekgns33 merged 9 commits intomainfrom
feat/hatch-egg
Mar 29, 2025
Merged

[Feat/hatch egg]#10
ekgns33 merged 9 commits intomainfrom
feat/hatch-egg

Conversation

@ekgns33
Copy link
Contributor

@ekgns33 ekgns33 commented Mar 29, 2025

작업 내역

  • 부화기능 구현

    • 부화기 등록
    • 애정 주입
    • 부화중인 알 상태 변경
  • 테스트 코드 작성

Notice

  • 여러 테이블에 대해 Select for update를 수행해야하는 경우가 생기고 있습니다.
  • 데드락이 생길 수 있어 X-Lock을 거는 메소드의 네이밍에는 aaaWithXLock이라고 표시하고 있습니다.
  • 데드락 방지를 위해 테이블에 락을 거는 순서를 맞추려고 합니다. XLock이 필요한 경우 주석을 확인해주세요

@ekgns33 ekgns33 requested a review from Copilot March 29, 2025 14:41
@ekgns33 ekgns33 self-assigned this Mar 29, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the egg hatching feature by introducing new commands, views, and processors to register eggs, inject love points, and transition egg states. It also adds corresponding endpoints and repository queries along with test code updates.

  • Added DTOs and commands for egg registration and love point usage.
  • Implemented processors and repository methods for incubating egg creation, love point updates, and egg state transitions.
  • Updated controllers to expose new endpoints for egg hatching flows.

Reviewed Changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/java/org/runimo/runimo/user/service/dtos/RegisterEggCommand.java New DTO for egg registration
src/main/java/org/runimo/runimo/user/service/dtos/IncubatingEggView.java New view for displaying incubating egg details
src/main/java/org/runimo/runimo/user/service/UserItemProcessor.java Updated to log item activity during item quantity updates and usage
src/main/java/org/runimo/runimo/user/service/LovePointProcessor.java Added Transactional annotation and updated comment for love point processing
src/main/java/org/runimo/runimo/user/service/IncubatingEggProcessor.java Introduced creation and love point update logic for incubating eggs
src/main/java/org/runimo/runimo/user/service/IncubatingEggFinder.java Finder for incubating egg list and view retrieval
src/main/java/org/runimo/runimo/user/repository/IncubatingEggRepository.java Repository queries for incubating eggs with XLock support
src/main/java/org/runimo/runimo/user/enums/UserHttpResponseCode.java New response codes for egg registration and love point usage
src/main/java/org/runimo/runimo/user/domain/IncubatingEgg.java Domain model for incubating eggs with state transition logic
src/main/java/org/runimo/runimo/user/domain/EggStatus.java Egg status enum updated for incubation flow
src/main/java/org/runimo/runimo/user/controller/** Controllers and requests adapted for new egg endpoints
Comments suppressed due to low confidence (1)

src/main/java/org/runimo/runimo/user/service/dtos/IncubatingEggView.java:20

  • [nitpick] The parameter name 'hatchable' (of type EggStatus) is potentially misleading since it represents a status rather than a boolean. Consider renaming it to 'eggStatus' for clarity.
public IncubatingEggView(Long id, String name, String imgUrl, Long hatchRequiredPointAmount, Long currentLovePointAmount, EggStatus hatchable) {

@ekgns33 ekgns33 merged commit 19b33a9 into main Mar 29, 2025
1 check passed
@ekgns33 ekgns33 deleted the feat/hatch-egg branch April 16, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants