mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 16:06:24 +00:00
54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
@startuml event-콘텐츠선택
|
|
!theme mono
|
|
|
|
title Event Service - 선택한 콘텐츠 저장 (UFR-CONT-020)
|
|
|
|
participant "EventController" as Controller <<C>>
|
|
participant "EventService" as Service <<S>>
|
|
participant "EventRepository" as Repo <<R>>
|
|
participant "Redis Cache" as Cache <<E>>
|
|
database "Event DB" as DB <<E>>
|
|
|
|
note over Controller: PUT /api/events/drafts/{id}/content
|
|
Controller -> Service: updateEventContent(eventDraftId, userId,\nselectedImageUrl, editedContent)
|
|
activate Service
|
|
|
|
Service -> Repo: findById(eventDraftId)
|
|
activate Repo
|
|
Repo -> DB: 이벤트 초안 조회\n(초안ID와 사용자ID로 조회)
|
|
activate DB
|
|
DB --> Repo: EventDraft
|
|
deactivate DB
|
|
Repo --> Service: EventDraft entity
|
|
deactivate Repo
|
|
|
|
Service -> Service: validateOwnership(userId, eventDraft)
|
|
Service -> Service: validateImageUrl(selectedImageUrl)
|
|
note right: 선택한 이미지 URL\n유효성 검증
|
|
|
|
Service -> Service: applyContentEdits(eventDraft, editedContent)
|
|
note right: 편집 내용 적용:\n- 텍스트 수정\n- 색상 변경
|
|
|
|
Service -> Repo: update(eventDraft)
|
|
activate Repo
|
|
Repo -> DB: 이벤트 초안 업데이트\n(선택된 이미지 URL,\n편집된 제목/텍스트,\n배경색/텍스트색,\n수정일시를 업데이트)
|
|
activate DB
|
|
DB --> Repo: OK
|
|
deactivate DB
|
|
Repo --> Service: EventDraft entity
|
|
deactivate Repo
|
|
|
|
Service -> Cache: delete("purpose:" + userId)
|
|
activate Cache
|
|
note right: 캐시 무효화
|
|
Cache --> Service: OK
|
|
deactivate Cache
|
|
|
|
Service --> Controller: EventContentResponse\n{eventDraftId, selectedImageUrl,\neditedContent}
|
|
deactivate Service
|
|
Controller --> Client: 200 OK\n{eventDraftId}
|
|
|
|
note over Controller, Cache: 콘텐츠 편집 내용:\n- 제목 텍스트\n- 경품 정보 텍스트\n- 참여 안내 텍스트\n- 배경색\n- 텍스트 색상\n- 강조 색상
|
|
|
|
@enduml
|