-
Notifications
You must be signed in to change notification settings - Fork 1
좋아요 API & Tour 정보 수정 #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 문자열 정보에 포함된 태그 제거 후 저장 - 명소 저장 시 분포 정보 저장하도록 변경
Walkthrough페스티벌/장소 좋아요 토글 기능이 추가되어 컨트롤러, 서비스, 리포지토리, DTO가 확장되었고, 좋아요 엔티티는 복합키(EmbeddedId)로 전환되었습니다. 투어 수집 로직은 항목별 트랜잭션 저장과 문자열 태그 제거가 도입되었으며, Place의 연관관계와 에러 상태 값이 보강되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant C as Controller (/like/{id})
participant S as CommandService
participant AR as AuthService
participant R as Repository (Entity,Like)
participant DB as DB
U->>C: PATCH /like/{entityId}
C->>S: like(entityId)
S->>S: entityId null 검사
S->>AR: getCurrentUser()
AR-->>S: User
S->>R: find Entity by id
R-->>S: Entity or null
alt Entity 없음
S-->>C: throw FESTIVAL/PLACE_NOT_FOUND
else Entity 있음
S->>R: findBy(Entity, User)
R-->>S: Like or null
alt Like 존재
S->>R: deleteBy(Entity, User)
R-->>S: 삭제됨
S-->>C: {success:true, message:"좋아요 취소 성공"}
else Like 없음
S->>DB: save(Like with EmbeddedId)
alt 저장 충돌(DataIntegrityViolation)
S->>R: deleteBy(Entity, User)
R-->>S: 삭제됨
S-->>C: {success:true, message:"좋아요 취소 성공"}
else 저장 성공
S-->>C: {success:true, message:"좋아요 성공"}
end
end
end
C-->>U: ApiResponse(Like DTO)
sequenceDiagram
autonumber
participant T as TourCommandService
participant U as External API Data
participant C as Converter
participant PR as PlaceRepository
participant TX as Transaction(REQUIRES_NEW)
U-->>T: place item list
T->>C: 문자열 필드 removeTag()
C-->>T: 정제된 Place 목록(+VisitorDistribution 랜덤 생성)
loop 각 Place
T->>TX: saveOne(place)
TX->>PR: save(place)
PR-->>TX: persisted
TX-->>T: 완료(개별 트랜잭션)
note over T: 아이템 실패는 캐치 후 이어감
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (18)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
좋아요 API 구현
Tour 정보 수정
Summary by CodeRabbit