feat: 작가 세부 정보 조회#163
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces comprehensive author detail enrichment and retrieval, adding Wikidata profile image extraction, GPT-based biography/profile/award generation, Kakao book import integration, book tag auto-assignment via GPT, and a REST endpoint returning enriched author information with book metadata and taste analysis. Changes
Sequence DiagramsequenceDiagram
participant Client
participant AuthorController
participant AuthorQueryServiceImpl
participant AuthorEnrichmentService
participant AuthorGptEnrichmentService
participant AuthorKakaoImportService
participant BookImportService
participant Repository
Client->>AuthorController: GET /api/v1/authors/{authorId}
AuthorController->>AuthorQueryServiceImpl: getAuthorDetail(authorId, sortBy)
AuthorQueryServiceImpl->>Repository: fetch Author by ID
Repository-->>AuthorQueryServiceImpl: Author
AuthorQueryServiceImpl->>AuthorQueryServiceImpl: check if enrichment needed
alt Enrichment Needed
AuthorQueryServiceImpl->>AuthorEnrichmentService: enrichAuthorByName(name)
AuthorEnrichmentService->>AuthorEnrichmentService: search Wikidata QID
AuthorEnrichmentService->>AuthorEnrichmentService: extract image from Wikidata JSON
AuthorEnrichmentService->>AuthorEnrichmentService: fallback to Wikipedia image fetch
AuthorEnrichmentService->>Repository: save enriched Author
AuthorQueryServiceImpl->>AuthorKakaoImportService: searchAuthorBooks(name)
AuthorKakaoImportService-->>AuthorQueryServiceImpl: KakaoBookSearchResponse
AuthorQueryServiceImpl->>BookImportService: import and upsert books
BookImportService->>Repository: save/update Books
AuthorQueryServiceImpl->>AuthorGptEnrichmentService: enrichAuthorInfo(name)
AuthorGptEnrichmentService->>AuthorGptEnrichmentService: build prompt & call GPT API
AuthorGptEnrichmentService-->>AuthorQueryServiceImpl: AuthorEnrichmentResult
AuthorQueryServiceImpl->>Repository: save enriched Author (biography, profileJson)
end
AuthorQueryServiceImpl->>Repository: fetch Author books (sorted)
Repository-->>AuthorQueryServiceImpl: Books
AuthorQueryServiceImpl->>AuthorQueryServiceImpl: enrich books with taste analysis
AuthorQueryServiceImpl->>Repository: fetch Author awards
Repository-->>AuthorQueryServiceImpl: Awards
AuthorQueryServiceImpl->>AuthorQueryServiceImpl: convert to AuthorDetailResponse
AuthorQueryServiceImpl-->>AuthorController: AuthorDetailResponse
AuthorController-->>Client: ResponseEntity<AuthorDetailResponse>
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Summary by CodeRabbit
Release Notes