mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2026-06-13 11:39:11 +00:00
백엔드 서비스 구조 개선 및 데이터베이스 스키마 추가
This commit is contained in:
+4
-5
@@ -7,7 +7,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이벤트 생성 완료 메시지 DTO
|
||||
@@ -21,16 +20,16 @@ import java.util.UUID;
|
||||
public class EventCreatedMessage {
|
||||
|
||||
/**
|
||||
* 이벤트 ID (UUID)
|
||||
* 이벤트 ID
|
||||
*/
|
||||
@JsonProperty("event_id")
|
||||
private UUID eventId;
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 사용자 ID (UUID)
|
||||
* 사용자 ID
|
||||
*/
|
||||
@JsonProperty("user_id")
|
||||
private UUID userId;
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 이벤트 제목
|
||||
|
||||
+2
-4
@@ -8,8 +8,6 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* AI 추천 요청 DTO
|
||||
*
|
||||
@@ -42,8 +40,8 @@ public class AiRecommendationRequest {
|
||||
public static class StoreInfo {
|
||||
|
||||
@NotNull(message = "매장 ID는 필수입니다.")
|
||||
@Schema(description = "매장 ID", required = true, example = "550e8400-e29b-41d4-a716-446655440002")
|
||||
private UUID storeId;
|
||||
@Schema(description = "매장 ID", required = true, example = "str_20250124_001")
|
||||
private String storeId;
|
||||
|
||||
@NotNull(message = "매장명은 필수입니다.")
|
||||
@Schema(description = "매장명", required = true, example = "우진네 고깃집")
|
||||
|
||||
+1
-3
@@ -6,8 +6,6 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이미지 선택 요청 DTO
|
||||
*
|
||||
@@ -22,7 +20,7 @@ import java.util.UUID;
|
||||
public class SelectImageRequest {
|
||||
|
||||
@NotNull(message = "이미지 ID는 필수입니다.")
|
||||
private UUID imageId;
|
||||
private String imageId;
|
||||
|
||||
private String imageUrl;
|
||||
}
|
||||
|
||||
+2
-3
@@ -9,7 +9,6 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* AI 추천 선택 요청 DTO
|
||||
@@ -28,8 +27,8 @@ import java.util.UUID;
|
||||
public class SelectRecommendationRequest {
|
||||
|
||||
@NotNull(message = "추천 ID는 필수입니다.")
|
||||
@Schema(description = "선택한 추천 ID", required = true, example = "550e8400-e29b-41d4-a716-446655440007")
|
||||
private UUID recommendationId;
|
||||
@Schema(description = "선택한 추천 ID", required = true, example = "rec_20250124_001")
|
||||
private String recommendationId;
|
||||
|
||||
@Valid
|
||||
@Schema(description = "커스터마이징 항목")
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이벤트 생성 응답 DTO
|
||||
@@ -22,7 +21,7 @@ import java.util.UUID;
|
||||
@Builder
|
||||
public class EventCreatedResponse {
|
||||
|
||||
private UUID eventId;
|
||||
private String eventId;
|
||||
private EventStatus status;
|
||||
private String objective;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
+6
-7
@@ -10,7 +10,6 @@ import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이벤트 상세 응답 DTO
|
||||
@@ -25,16 +24,16 @@ import java.util.UUID;
|
||||
@Builder
|
||||
public class EventDetailResponse {
|
||||
|
||||
private UUID eventId;
|
||||
private UUID userId;
|
||||
private UUID storeId;
|
||||
private String eventId;
|
||||
private String userId;
|
||||
private String storeId;
|
||||
private String eventName;
|
||||
private String description;
|
||||
private String objective;
|
||||
private LocalDate startDate;
|
||||
private LocalDate endDate;
|
||||
private EventStatus status;
|
||||
private UUID selectedImageId;
|
||||
private String selectedImageId;
|
||||
private String selectedImageUrl;
|
||||
private Integer participants;
|
||||
private Integer targetParticipants;
|
||||
@@ -57,7 +56,7 @@ public class EventDetailResponse {
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public static class GeneratedImageDto {
|
||||
private UUID imageId;
|
||||
private String imageId;
|
||||
private String imageUrl;
|
||||
private String style;
|
||||
private String platform;
|
||||
@@ -70,7 +69,7 @@ public class EventDetailResponse {
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public static class AiRecommendationDto {
|
||||
private UUID recommendationId;
|
||||
private String recommendationId;
|
||||
private String eventName;
|
||||
private String description;
|
||||
private String promotionType;
|
||||
|
||||
+2
-3
@@ -7,7 +7,6 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이미지 편집 응답 DTO
|
||||
@@ -25,8 +24,8 @@ import java.util.UUID;
|
||||
@Schema(description = "이미지 편집 응답")
|
||||
public class ImageEditResponse {
|
||||
|
||||
@Schema(description = "편집된 이미지 ID", example = "550e8400-e29b-41d4-a716-446655440008")
|
||||
private UUID imageId;
|
||||
@Schema(description = "편집된 이미지 ID", example = "img_20250124_001")
|
||||
private String imageId;
|
||||
|
||||
@Schema(description = "편집된 이미지 URL", example = "https://cdn.kt-event.com/images/event-img-001-edited.jpg")
|
||||
private String imageUrl;
|
||||
|
||||
+1
-2
@@ -6,7 +6,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이미지 생성 응답 DTO
|
||||
@@ -21,7 +20,7 @@ import java.util.UUID;
|
||||
@Builder
|
||||
public class ImageGenerationResponse {
|
||||
|
||||
private UUID jobId;
|
||||
private String jobId;
|
||||
private String status;
|
||||
private String message;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
+2
-4
@@ -7,8 +7,6 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Job 접수 응답 DTO
|
||||
*
|
||||
@@ -25,8 +23,8 @@ import java.util.UUID;
|
||||
@Schema(description = "Job 접수 응답")
|
||||
public class JobAcceptedResponse {
|
||||
|
||||
@Schema(description = "생성된 Job ID", example = "550e8400-e29b-41d4-a716-446655440005")
|
||||
private UUID jobId;
|
||||
@Schema(description = "생성된 Job ID", example = "job_20250124_001")
|
||||
private String jobId;
|
||||
|
||||
@Schema(description = "Job 상태 (초기 상태는 PENDING)", example = "PENDING")
|
||||
private JobStatus status;
|
||||
|
||||
+1
-2
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Job 상태 응답 DTO
|
||||
@@ -23,7 +22,7 @@ import java.util.UUID;
|
||||
@Builder
|
||||
public class JobStatusResponse {
|
||||
|
||||
private UUID jobId;
|
||||
private String jobId;
|
||||
private JobType jobType;
|
||||
private JobStatus status;
|
||||
private int progress;
|
||||
|
||||
+33
-34
@@ -24,7 +24,6 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -52,13 +51,13 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 생성 (Step 1: 목적 선택)
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param storeId 매장 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param storeId 매장 ID
|
||||
* @param request 목적 선택 요청
|
||||
* @return 생성된 이벤트 응답
|
||||
*/
|
||||
@Transactional
|
||||
public EventCreatedResponse createEvent(UUID userId, UUID storeId, SelectObjectiveRequest request) {
|
||||
public EventCreatedResponse createEvent(String userId, String storeId, SelectObjectiveRequest request) {
|
||||
log.info("이벤트 생성 시작 - userId: {}, storeId: {}, objective: {}",
|
||||
userId, storeId, request.getObjective());
|
||||
|
||||
@@ -87,11 +86,11 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 상세 조회
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @return 이벤트 상세 응답
|
||||
*/
|
||||
public EventDetailResponse getEvent(UUID userId, UUID eventId) {
|
||||
public EventDetailResponse getEvent(String userId, String eventId) {
|
||||
log.info("이벤트 조회 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
Event event = eventRepository.findByEventIdAndUserId(eventId, userId)
|
||||
@@ -108,7 +107,7 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 목록 조회 (페이징, 필터링)
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param status 상태 필터
|
||||
* @param search 검색어
|
||||
* @param objective 목적 필터
|
||||
@@ -116,7 +115,7 @@ public class EventService {
|
||||
* @return 이벤트 목록
|
||||
*/
|
||||
public Page<EventDetailResponse> getEvents(
|
||||
UUID userId,
|
||||
String userId,
|
||||
EventStatus status,
|
||||
String search,
|
||||
String objective,
|
||||
@@ -139,11 +138,11 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 삭제
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
*/
|
||||
@Transactional
|
||||
public void deleteEvent(UUID userId, UUID eventId) {
|
||||
public void deleteEvent(String userId, String eventId) {
|
||||
log.info("이벤트 삭제 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
Event event = eventRepository.findByEventIdAndUserId(eventId, userId)
|
||||
@@ -161,11 +160,11 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 배포
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
*/
|
||||
@Transactional
|
||||
public void publishEvent(UUID userId, UUID eventId) {
|
||||
public void publishEvent(String userId, String eventId) {
|
||||
log.info("이벤트 배포 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
Event event = eventRepository.findByEventIdAndUserId(eventId, userId)
|
||||
@@ -190,11 +189,11 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 종료
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
*/
|
||||
@Transactional
|
||||
public void endEvent(UUID userId, UUID eventId) {
|
||||
public void endEvent(String userId, String eventId) {
|
||||
log.info("이벤트 종료 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
Event event = eventRepository.findByEventIdAndUserId(eventId, userId)
|
||||
@@ -210,13 +209,13 @@ public class EventService {
|
||||
/**
|
||||
* 이미지 생성 요청
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param request 이미지 생성 요청
|
||||
* @return 이미지 생성 응답 (Job ID 포함)
|
||||
*/
|
||||
@Transactional
|
||||
public ImageGenerationResponse requestImageGeneration(UUID userId, UUID eventId, ImageGenerationRequest request) {
|
||||
public ImageGenerationResponse requestImageGeneration(String userId, String eventId, ImageGenerationRequest request) {
|
||||
log.info("이미지 생성 요청 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
// 이벤트 조회 및 권한 확인
|
||||
@@ -245,9 +244,9 @@ public class EventService {
|
||||
|
||||
// Kafka 메시지 발행
|
||||
imageJobKafkaProducer.publishImageGenerationJob(
|
||||
job.getJobId().toString(),
|
||||
userId.toString(),
|
||||
eventId.toString(),
|
||||
job.getJobId(),
|
||||
userId,
|
||||
eventId,
|
||||
prompt
|
||||
);
|
||||
|
||||
@@ -265,13 +264,13 @@ public class EventService {
|
||||
/**
|
||||
* 이미지 선택
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param imageId 이미지 ID
|
||||
* @param request 이미지 선택 요청
|
||||
*/
|
||||
@Transactional
|
||||
public void selectImage(UUID userId, UUID eventId, UUID imageId, SelectImageRequest request) {
|
||||
public void selectImage(String userId, String eventId, String imageId, SelectImageRequest request) {
|
||||
log.info("이미지 선택 - userId: {}, eventId: {}, imageId: {}", userId, eventId, imageId);
|
||||
|
||||
// 이벤트 조회 및 권한 확인
|
||||
@@ -294,13 +293,13 @@ public class EventService {
|
||||
/**
|
||||
* AI 추천 요청
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param request AI 추천 요청
|
||||
* @return Job 접수 응답
|
||||
*/
|
||||
@Transactional
|
||||
public JobAcceptedResponse requestAiRecommendations(UUID userId, UUID eventId, AiRecommendationRequest request) {
|
||||
public JobAcceptedResponse requestAiRecommendations(String userId, String eventId, AiRecommendationRequest request) {
|
||||
log.info("AI 추천 요청 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
// 이벤트 조회 및 권한 확인
|
||||
@@ -322,9 +321,9 @@ public class EventService {
|
||||
|
||||
// Kafka 메시지 발행
|
||||
aiJobKafkaProducer.publishAIGenerationJob(
|
||||
job.getJobId().toString(),
|
||||
userId.toString(),
|
||||
eventId.toString(),
|
||||
job.getJobId(),
|
||||
userId,
|
||||
eventId,
|
||||
request.getStoreInfo().getStoreName(),
|
||||
request.getStoreInfo().getCategory(),
|
||||
request.getStoreInfo().getDescription(),
|
||||
@@ -343,12 +342,12 @@ public class EventService {
|
||||
/**
|
||||
* AI 추천 선택
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param request AI 추천 선택 요청
|
||||
*/
|
||||
@Transactional
|
||||
public void selectRecommendation(UUID userId, UUID eventId, SelectRecommendationRequest request) {
|
||||
public void selectRecommendation(String userId, String eventId, SelectRecommendationRequest request) {
|
||||
log.info("AI 추천 선택 - userId: {}, eventId: {}, recommendationId: {}",
|
||||
userId, eventId, request.getRecommendationId());
|
||||
|
||||
@@ -409,14 +408,14 @@ public class EventService {
|
||||
/**
|
||||
* 이미지 편집
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param imageId 이미지 ID
|
||||
* @param request 이미지 편집 요청
|
||||
* @return 이미지 편집 응답
|
||||
*/
|
||||
@Transactional
|
||||
public ImageEditResponse editImage(UUID userId, UUID eventId, UUID imageId, ImageEditRequest request) {
|
||||
public ImageEditResponse editImage(String userId, String eventId, String imageId, ImageEditRequest request) {
|
||||
log.info("이미지 편집 - userId: {}, eventId: {}, imageId: {}", userId, eventId, imageId);
|
||||
|
||||
// 이벤트 조회 및 권한 확인
|
||||
@@ -450,12 +449,12 @@ public class EventService {
|
||||
/**
|
||||
* 배포 채널 선택
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param request 배포 채널 선택 요청
|
||||
*/
|
||||
@Transactional
|
||||
public void selectChannels(UUID userId, UUID eventId, SelectChannelsRequest request) {
|
||||
public void selectChannels(String userId, String eventId, SelectChannelsRequest request) {
|
||||
log.info("배포 채널 선택 - userId: {}, eventId: {}, channels: {}",
|
||||
userId, eventId, request.getChannels());
|
||||
|
||||
@@ -479,13 +478,13 @@ public class EventService {
|
||||
/**
|
||||
* 이벤트 수정
|
||||
*
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID
|
||||
* @param request 이벤트 수정 요청
|
||||
* @return 이벤트 상세 응답
|
||||
*/
|
||||
@Transactional
|
||||
public EventDetailResponse updateEvent(UUID userId, UUID eventId, UpdateEventRequest request) {
|
||||
public EventDetailResponse updateEvent(String userId, String eventId, UpdateEventRequest request) {
|
||||
log.info("이벤트 수정 - userId: {}, eventId: {}", userId, eventId);
|
||||
|
||||
// 이벤트 조회 및 권한 확인
|
||||
|
||||
+5
-7
@@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Job 서비스
|
||||
*
|
||||
@@ -38,7 +36,7 @@ public class JobService {
|
||||
* @return 생성된 Job
|
||||
*/
|
||||
@Transactional
|
||||
public Job createJob(UUID eventId, JobType jobType) {
|
||||
public Job createJob(String eventId, JobType jobType) {
|
||||
log.info("Job 생성 - eventId: {}, jobType: {}", eventId, jobType);
|
||||
|
||||
Job job = Job.builder()
|
||||
@@ -59,7 +57,7 @@ public class JobService {
|
||||
* @param jobId Job ID
|
||||
* @return Job 상태 응답
|
||||
*/
|
||||
public JobStatusResponse getJobStatus(UUID jobId) {
|
||||
public JobStatusResponse getJobStatus(String jobId) {
|
||||
log.info("Job 상태 조회 - jobId: {}", jobId);
|
||||
|
||||
Job job = jobRepository.findById(jobId)
|
||||
@@ -75,7 +73,7 @@ public class JobService {
|
||||
* @param progress 진행률
|
||||
*/
|
||||
@Transactional
|
||||
public void updateJobProgress(UUID jobId, int progress) {
|
||||
public void updateJobProgress(String jobId, int progress) {
|
||||
log.info("Job 진행률 업데이트 - jobId: {}, progress: {}", jobId, progress);
|
||||
|
||||
Job job = jobRepository.findById(jobId)
|
||||
@@ -93,7 +91,7 @@ public class JobService {
|
||||
* @param resultKey Redis 결과 키
|
||||
*/
|
||||
@Transactional
|
||||
public void completeJob(UUID jobId, String resultKey) {
|
||||
public void completeJob(String jobId, String resultKey) {
|
||||
log.info("Job 완료 - jobId: {}, resultKey: {}", jobId, resultKey);
|
||||
|
||||
Job job = jobRepository.findById(jobId)
|
||||
@@ -113,7 +111,7 @@ public class JobService {
|
||||
* @param errorMessage 에러 메시지
|
||||
*/
|
||||
@Transactional
|
||||
public void failJob(UUID jobId, String errorMessage) {
|
||||
public void failJob(String jobId, String errorMessage) {
|
||||
log.info("Job 실패 - jobId: {}, errorMessage: {}", jobId, errorMessage);
|
||||
|
||||
Job job = jobRepository.findById(jobId)
|
||||
|
||||
+3
-5
@@ -1,7 +1,5 @@
|
||||
package com.kt.event.eventservice.application.service;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 알림 서비스 인터페이스
|
||||
*
|
||||
@@ -22,7 +20,7 @@ public interface NotificationService {
|
||||
* @param jobType 작업 타입
|
||||
* @param message 알림 메시지
|
||||
*/
|
||||
void notifyJobCompleted(UUID userId, UUID jobId, String jobType, String message);
|
||||
void notifyJobCompleted(String userId, String jobId, String jobType, String message);
|
||||
|
||||
/**
|
||||
* 작업 실패 알림 전송
|
||||
@@ -32,7 +30,7 @@ public interface NotificationService {
|
||||
* @param jobType 작업 타입
|
||||
* @param errorMessage 에러 메시지
|
||||
*/
|
||||
void notifyJobFailed(UUID userId, UUID jobId, String jobType, String errorMessage);
|
||||
void notifyJobFailed(String userId, String jobId, String jobType, String errorMessage);
|
||||
|
||||
/**
|
||||
* 작업 진행 상태 알림 전송
|
||||
@@ -42,5 +40,5 @@ public interface NotificationService {
|
||||
* @param jobType 작업 타입
|
||||
* @param progress 진행률 (0-100)
|
||||
*/
|
||||
void notifyJobProgress(UUID userId, UUID jobId, String jobType, int progress);
|
||||
void notifyJobProgress(String userId, String jobId, String jobType, int progress);
|
||||
}
|
||||
|
||||
+5
-6
@@ -11,7 +11,6 @@ import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 개발 환경용 인증 필터
|
||||
@@ -35,11 +34,11 @@ public class DevAuthenticationFilter extends OncePerRequestFilter {
|
||||
|
||||
// 개발용 기본 UserPrincipal 생성
|
||||
UserPrincipal userPrincipal = new UserPrincipal(
|
||||
UUID.fromString("11111111-1111-1111-1111-111111111111"), // userId
|
||||
UUID.fromString("22222222-2222-2222-2222-222222222222"), // storeId
|
||||
"dev@test.com", // email
|
||||
"개발테스트사용자", // name
|
||||
Collections.singletonList("USER") // roles
|
||||
"usr_dev_test_001", // userId
|
||||
"str_dev_test_001", // storeId
|
||||
"dev@test.com", // email
|
||||
"개발테스트사용자", // name
|
||||
Collections.singletonList("USER") // roles
|
||||
);
|
||||
|
||||
// Authentication 객체 생성 및 SecurityContext에 설정
|
||||
|
||||
+2
-7
@@ -3,9 +3,6 @@ package com.kt.event.eventservice.domain.entity;
|
||||
import com.kt.event.common.entity.BaseTimeEntity;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* AI 추천 엔티티
|
||||
@@ -26,10 +23,8 @@ import java.util.UUID;
|
||||
public class AiRecommendation extends BaseTimeEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "uuid2")
|
||||
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
||||
@Column(name = "recommendation_id", columnDefinition = "uuid")
|
||||
private UUID recommendationId;
|
||||
@Column(name = "recommendation_id", length = 50)
|
||||
private String recommendationId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "event_id", nullable = false)
|
||||
|
||||
@@ -6,7 +6,6 @@ import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
@@ -32,16 +31,14 @@ import java.util.*;
|
||||
public class Event extends BaseTimeEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "uuid2")
|
||||
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
||||
@Column(name = "event_id", columnDefinition = "uuid")
|
||||
private UUID eventId;
|
||||
@Column(name = "event_id", length = 50)
|
||||
private String eventId;
|
||||
|
||||
@Column(name = "user_id", nullable = false, columnDefinition = "uuid")
|
||||
private UUID userId;
|
||||
@Column(name = "user_id", nullable = false, length = 50)
|
||||
private String userId;
|
||||
|
||||
@Column(name = "store_id", nullable = false, columnDefinition = "uuid")
|
||||
private UUID storeId;
|
||||
@Column(name = "store_id", nullable = false, length = 50)
|
||||
private String storeId;
|
||||
|
||||
@Column(name = "event_name", length = 200)
|
||||
private String eventName;
|
||||
@@ -63,8 +60,8 @@ public class Event extends BaseTimeEntity {
|
||||
@Builder.Default
|
||||
private EventStatus status = EventStatus.DRAFT;
|
||||
|
||||
@Column(name = "selected_image_id", columnDefinition = "uuid")
|
||||
private UUID selectedImageId;
|
||||
@Column(name = "selected_image_id", length = 50)
|
||||
private String selectedImageId;
|
||||
|
||||
@Column(name = "selected_image_url", length = 500)
|
||||
private String selectedImageUrl;
|
||||
@@ -128,7 +125,7 @@ public class Event extends BaseTimeEntity {
|
||||
/**
|
||||
* 이미지 선택
|
||||
*/
|
||||
public void selectImage(UUID imageId, String imageUrl) {
|
||||
public void selectImage(String imageId, String imageUrl) {
|
||||
this.selectedImageId = imageId;
|
||||
this.selectedImageUrl = imageUrl;
|
||||
|
||||
|
||||
+2
-7
@@ -3,9 +3,6 @@ package com.kt.event.eventservice.domain.entity;
|
||||
import com.kt.event.common.entity.BaseTimeEntity;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 생성된 이미지 엔티티
|
||||
@@ -26,10 +23,8 @@ import java.util.UUID;
|
||||
public class GeneratedImage extends BaseTimeEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "uuid2")
|
||||
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
||||
@Column(name = "image_id", columnDefinition = "uuid")
|
||||
private UUID imageId;
|
||||
@Column(name = "image_id", length = 50)
|
||||
private String imageId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "event_id", nullable = false)
|
||||
|
||||
@@ -5,10 +5,8 @@ import com.kt.event.eventservice.domain.enums.JobStatus;
|
||||
import com.kt.event.eventservice.domain.enums.JobType;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 비동기 작업 엔티티
|
||||
@@ -29,13 +27,11 @@ import java.util.UUID;
|
||||
public class Job extends BaseTimeEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "uuid2")
|
||||
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
||||
@Column(name = "job_id", columnDefinition = "uuid")
|
||||
private UUID jobId;
|
||||
@Column(name = "job_id", length = 50)
|
||||
private String jobId;
|
||||
|
||||
@Column(name = "event_id", nullable = false, columnDefinition = "uuid")
|
||||
private UUID eventId;
|
||||
@Column(name = "event_id", nullable = false, length = 50)
|
||||
private String eventId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "job_type", nullable = false, length = 30)
|
||||
|
||||
+3
-4
@@ -5,7 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* AI 추천 Repository
|
||||
@@ -15,15 +14,15 @@ import java.util.UUID;
|
||||
* @since 2025-10-23
|
||||
*/
|
||||
@Repository
|
||||
public interface AiRecommendationRepository extends JpaRepository<AiRecommendation, UUID> {
|
||||
public interface AiRecommendationRepository extends JpaRepository<AiRecommendation, String> {
|
||||
|
||||
/**
|
||||
* 이벤트별 AI 추천 목록 조회
|
||||
*/
|
||||
List<AiRecommendation> findByEventEventId(UUID eventId);
|
||||
List<AiRecommendation> findByEventEventId(String eventId);
|
||||
|
||||
/**
|
||||
* 이벤트별 선택된 AI 추천 조회
|
||||
*/
|
||||
AiRecommendation findByEventEventIdAndIsSelectedTrue(UUID eventId);
|
||||
AiRecommendation findByEventEventIdAndIsSelectedTrue(String eventId);
|
||||
}
|
||||
|
||||
+5
-6
@@ -10,7 +10,6 @@ import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이벤트 Repository
|
||||
@@ -20,7 +19,7 @@ import java.util.UUID;
|
||||
* @since 2025-10-23
|
||||
*/
|
||||
@Repository
|
||||
public interface EventRepository extends JpaRepository<Event, UUID> {
|
||||
public interface EventRepository extends JpaRepository<Event, String> {
|
||||
|
||||
/**
|
||||
* 사용자 ID와 이벤트 ID로 조회
|
||||
@@ -29,8 +28,8 @@ public interface EventRepository extends JpaRepository<Event, UUID> {
|
||||
"LEFT JOIN FETCH e.channels " +
|
||||
"WHERE e.eventId = :eventId AND e.userId = :userId")
|
||||
Optional<Event> findByEventIdAndUserId(
|
||||
@Param("eventId") UUID eventId,
|
||||
@Param("userId") UUID userId
|
||||
@Param("eventId") String eventId,
|
||||
@Param("userId") String userId
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -42,7 +41,7 @@ public interface EventRepository extends JpaRepository<Event, UUID> {
|
||||
"AND (:search IS NULL OR e.eventName LIKE %:search%) " +
|
||||
"AND (:objective IS NULL OR e.objective = :objective)")
|
||||
Page<Event> findEventsByUser(
|
||||
@Param("userId") UUID userId,
|
||||
@Param("userId") String userId,
|
||||
@Param("status") EventStatus status,
|
||||
@Param("search") String search,
|
||||
@Param("objective") String objective,
|
||||
@@ -52,5 +51,5 @@ public interface EventRepository extends JpaRepository<Event, UUID> {
|
||||
/**
|
||||
* 사용자별 이벤트 개수 조회 (상태별)
|
||||
*/
|
||||
long countByUserIdAndStatus(UUID userId, EventStatus status);
|
||||
long countByUserIdAndStatus(String userId, EventStatus status);
|
||||
}
|
||||
|
||||
+3
-4
@@ -5,7 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 생성된 이미지 Repository
|
||||
@@ -15,15 +14,15 @@ import java.util.UUID;
|
||||
* @since 2025-10-23
|
||||
*/
|
||||
@Repository
|
||||
public interface GeneratedImageRepository extends JpaRepository<GeneratedImage, UUID> {
|
||||
public interface GeneratedImageRepository extends JpaRepository<GeneratedImage, String> {
|
||||
|
||||
/**
|
||||
* 이벤트별 생성된 이미지 목록 조회
|
||||
*/
|
||||
List<GeneratedImage> findByEventEventId(UUID eventId);
|
||||
List<GeneratedImage> findByEventEventId(String eventId);
|
||||
|
||||
/**
|
||||
* 이벤트별 선택된 이미지 조회
|
||||
*/
|
||||
GeneratedImage findByEventEventIdAndIsSelectedTrue(UUID eventId);
|
||||
GeneratedImage findByEventEventIdAndIsSelectedTrue(String eventId);
|
||||
}
|
||||
|
||||
+4
-5
@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 비동기 작업 Repository
|
||||
@@ -18,22 +17,22 @@ import java.util.UUID;
|
||||
* @since 2025-10-23
|
||||
*/
|
||||
@Repository
|
||||
public interface JobRepository extends JpaRepository<Job, UUID> {
|
||||
public interface JobRepository extends JpaRepository<Job, String> {
|
||||
|
||||
/**
|
||||
* 이벤트별 작업 목록 조회
|
||||
*/
|
||||
List<Job> findByEventId(UUID eventId);
|
||||
List<Job> findByEventId(String eventId);
|
||||
|
||||
/**
|
||||
* 이벤트 및 작업 유형별 조회
|
||||
*/
|
||||
Optional<Job> findByEventIdAndJobType(UUID eventId, JobType jobType);
|
||||
Optional<Job> findByEventIdAndJobType(String eventId, JobType jobType);
|
||||
|
||||
/**
|
||||
* 이벤트 및 작업 유형별 최신 작업 조회
|
||||
*/
|
||||
Optional<Job> findFirstByEventIdAndJobTypeOrderByCreatedAtDesc(UUID eventId, JobType jobType);
|
||||
Optional<Job> findFirstByEventIdAndJobTypeOrderByCreatedAtDesc(String eventId, JobType jobType);
|
||||
|
||||
/**
|
||||
* 상태별 작업 목록 조회
|
||||
|
||||
+5
-7
@@ -18,8 +18,6 @@ import org.springframework.messaging.handler.annotation.Payload;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* AI 이벤트 생성 작업 메시지 구독 Consumer
|
||||
*
|
||||
@@ -93,7 +91,7 @@ public class AIJobKafkaConsumer {
|
||||
@Transactional
|
||||
protected void processAIEventGenerationJob(AIEventGenerationJobMessage message) {
|
||||
try {
|
||||
UUID jobId = UUID.fromString(message.getJobId());
|
||||
String jobId = message.getJobId();
|
||||
|
||||
// Job 조회
|
||||
Job job = jobRepository.findById(jobId).orElse(null);
|
||||
@@ -102,7 +100,7 @@ public class AIJobKafkaConsumer {
|
||||
return;
|
||||
}
|
||||
|
||||
UUID eventId = job.getEventId();
|
||||
String eventId = job.getEventId();
|
||||
|
||||
// Event 조회 (모든 케이스에서 사용)
|
||||
Event event = eventRepository.findById(eventId).orElse(null);
|
||||
@@ -142,7 +140,7 @@ public class AIJobKafkaConsumer {
|
||||
eventId, aiData.getEventTitle());
|
||||
|
||||
// 사용자에게 알림 전송
|
||||
UUID userId = event.getUserId();
|
||||
String userId = event.getUserId();
|
||||
notificationService.notifyJobCompleted(
|
||||
userId,
|
||||
jobId,
|
||||
@@ -166,7 +164,7 @@ public class AIJobKafkaConsumer {
|
||||
|
||||
// 사용자에게 실패 알림 전송
|
||||
if (event != null) {
|
||||
UUID userId = event.getUserId();
|
||||
String userId = event.getUserId();
|
||||
notificationService.notifyJobFailed(
|
||||
userId,
|
||||
jobId,
|
||||
@@ -185,7 +183,7 @@ public class AIJobKafkaConsumer {
|
||||
|
||||
// 사용자에게 진행 상태 알림 전송
|
||||
if (event != null) {
|
||||
UUID userId = event.getUserId();
|
||||
String userId = event.getUserId();
|
||||
notificationService.notifyJobProgress(
|
||||
userId,
|
||||
jobId,
|
||||
|
||||
+3
-3
@@ -29,12 +29,12 @@ public class EventKafkaProducer {
|
||||
/**
|
||||
* 이벤트 생성 완료 메시지 발행
|
||||
*
|
||||
* @param eventId 이벤트 ID (UUID)
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param eventId 이벤트 ID
|
||||
* @param userId 사용자 ID
|
||||
* @param title 이벤트 제목
|
||||
* @param eventType 이벤트 타입
|
||||
*/
|
||||
public void publishEventCreated(java.util.UUID eventId, java.util.UUID userId, String title, String eventType) {
|
||||
public void publishEventCreated(String eventId, String userId, String title, String eventType) {
|
||||
EventCreatedMessage message = EventCreatedMessage.builder()
|
||||
.eventId(eventId)
|
||||
.userId(userId)
|
||||
|
||||
+5
-7
@@ -18,8 +18,6 @@ import org.springframework.messaging.handler.annotation.Payload;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이미지 생성 작업 메시지 구독 Consumer
|
||||
*
|
||||
@@ -94,8 +92,8 @@ public class ImageJobKafkaConsumer {
|
||||
@Transactional
|
||||
protected void processImageGenerationJob(ImageGenerationJobMessage message) {
|
||||
try {
|
||||
UUID jobId = UUID.fromString(message.getJobId());
|
||||
UUID eventId = UUID.fromString(message.getEventId());
|
||||
String jobId = message.getJobId();
|
||||
String eventId = message.getEventId();
|
||||
|
||||
// Job 조회
|
||||
Job job = jobRepository.findById(jobId).orElse(null);
|
||||
@@ -130,7 +128,7 @@ public class ImageJobKafkaConsumer {
|
||||
eventId, message.getImageUrl());
|
||||
|
||||
// 사용자에게 알림 전송
|
||||
UUID userId = event.getUserId();
|
||||
String userId = event.getUserId();
|
||||
notificationService.notifyJobCompleted(
|
||||
userId,
|
||||
jobId,
|
||||
@@ -181,7 +179,7 @@ public class ImageJobKafkaConsumer {
|
||||
|
||||
// 사용자에게 실패 알림 전송
|
||||
if (event != null) {
|
||||
UUID userId = event.getUserId();
|
||||
String userId = event.getUserId();
|
||||
notificationService.notifyJobFailed(
|
||||
userId,
|
||||
jobId,
|
||||
@@ -202,7 +200,7 @@ public class ImageJobKafkaConsumer {
|
||||
|
||||
// 사용자에게 진행 상태 알림 전송
|
||||
if (event != null) {
|
||||
UUID userId = event.getUserId();
|
||||
String userId = event.getUserId();
|
||||
notificationService.notifyJobProgress(
|
||||
userId,
|
||||
jobId,
|
||||
|
||||
+4
-6
@@ -4,8 +4,6 @@ import com.kt.event.eventservice.application.service.NotificationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 로깅 기반 알림 서비스 구현
|
||||
*
|
||||
@@ -20,16 +18,16 @@ import java.util.UUID;
|
||||
public class LoggingNotificationService implements NotificationService {
|
||||
|
||||
@Override
|
||||
public void notifyJobCompleted(UUID userId, UUID jobId, String jobType, String message) {
|
||||
public void notifyJobCompleted(String userId, String jobId, String jobType, String message) {
|
||||
log.info("📢 [작업 완료 알림] UserId: {}, JobId: {}, JobType: {}, Message: {}",
|
||||
userId, jobId, jobType, message);
|
||||
|
||||
// TODO: WebSocket, SSE, 또는 Push Notification으로 실시간 알림 전송
|
||||
// 예: webSocketTemplate.convertAndSendToUser(userId.toString(), "/queue/notifications", notification);
|
||||
// 예: webSocketTemplate.convertAndSendToUser(userId, "/queue/notifications", notification);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyJobFailed(UUID userId, UUID jobId, String jobType, String errorMessage) {
|
||||
public void notifyJobFailed(String userId, String jobId, String jobType, String errorMessage) {
|
||||
log.error("📢 [작업 실패 알림] UserId: {}, JobId: {}, JobType: {}, Error: {}",
|
||||
userId, jobId, jobType, errorMessage);
|
||||
|
||||
@@ -37,7 +35,7 @@ public class LoggingNotificationService implements NotificationService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyJobProgress(UUID userId, UUID jobId, String jobType, int progress) {
|
||||
public void notifyJobProgress(String userId, String jobId, String jobType, int progress) {
|
||||
log.info("📢 [작업 진행 알림] UserId: {}, JobId: {}, JobType: {}, Progress: {}%",
|
||||
userId, jobId, jobType, progress);
|
||||
|
||||
|
||||
+13
-15
@@ -21,8 +21,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이벤트 컨트롤러
|
||||
*
|
||||
@@ -129,7 +127,7 @@ public class EventController {
|
||||
@GetMapping("/{eventId}")
|
||||
@Operation(summary = "이벤트 상세 조회", description = "특정 이벤트의 상세 정보를 조회합니다.")
|
||||
public ResponseEntity<ApiResponse<EventDetailResponse>> getEvent(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
log.info("이벤트 상세 조회 API 호출 - userId: {}, eventId: {}",
|
||||
@@ -150,7 +148,7 @@ public class EventController {
|
||||
@DeleteMapping("/{eventId}")
|
||||
@Operation(summary = "이벤트 삭제", description = "이벤트를 삭제합니다. DRAFT 상태만 삭제 가능합니다.")
|
||||
public ResponseEntity<ApiResponse<Void>> deleteEvent(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
log.info("이벤트 삭제 API 호출 - userId: {}, eventId: {}",
|
||||
@@ -171,7 +169,7 @@ public class EventController {
|
||||
@PostMapping("/{eventId}/publish")
|
||||
@Operation(summary = "이벤트 배포", description = "이벤트를 배포합니다. DRAFT → PUBLISHED 상태 변경.")
|
||||
public ResponseEntity<ApiResponse<Void>> publishEvent(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
log.info("이벤트 배포 API 호출 - userId: {}, eventId: {}",
|
||||
@@ -192,7 +190,7 @@ public class EventController {
|
||||
@PostMapping("/{eventId}/end")
|
||||
@Operation(summary = "이벤트 종료", description = "이벤트를 종료합니다. PUBLISHED → ENDED 상태 변경.")
|
||||
public ResponseEntity<ApiResponse<Void>> endEvent(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
log.info("이벤트 종료 API 호출 - userId: {}, eventId: {}",
|
||||
@@ -214,7 +212,7 @@ public class EventController {
|
||||
@PostMapping("/{eventId}/images")
|
||||
@Operation(summary = "이미지 생성 요청", description = "AI를 통해 이벤트 이미지를 생성합니다.")
|
||||
public ResponseEntity<ApiResponse<ImageGenerationResponse>> requestImageGeneration(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@Valid @RequestBody ImageGenerationRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
@@ -243,8 +241,8 @@ public class EventController {
|
||||
@PutMapping("/{eventId}/images/{imageId}/select")
|
||||
@Operation(summary = "이미지 선택", description = "생성된 이미지 중 하나를 선택합니다.")
|
||||
public ResponseEntity<ApiResponse<Void>> selectImage(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable UUID imageId,
|
||||
@PathVariable String eventId,
|
||||
@PathVariable String imageId,
|
||||
@Valid @RequestBody SelectImageRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
@@ -272,7 +270,7 @@ public class EventController {
|
||||
@PostMapping("/{eventId}/ai-recommendations")
|
||||
@Operation(summary = "AI 추천 요청", description = "AI 서비스에 이벤트 추천 생성을 요청합니다.")
|
||||
public ResponseEntity<ApiResponse<JobAcceptedResponse>> requestAiRecommendations(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@Valid @RequestBody AiRecommendationRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
@@ -300,7 +298,7 @@ public class EventController {
|
||||
@PutMapping("/{eventId}/recommendations")
|
||||
@Operation(summary = "AI 추천 선택", description = "AI가 생성한 추천 중 하나를 선택하고 커스터마이징합니다.")
|
||||
public ResponseEntity<ApiResponse<Void>> selectRecommendation(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@Valid @RequestBody SelectRecommendationRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
@@ -328,8 +326,8 @@ public class EventController {
|
||||
@PutMapping("/{eventId}/images/{imageId}/edit")
|
||||
@Operation(summary = "이미지 편집", description = "선택된 이미지를 편집합니다.")
|
||||
public ResponseEntity<ApiResponse<ImageEditResponse>> editImage(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable UUID imageId,
|
||||
@PathVariable String eventId,
|
||||
@PathVariable String imageId,
|
||||
@Valid @RequestBody ImageEditRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
@@ -357,7 +355,7 @@ public class EventController {
|
||||
@PutMapping("/{eventId}/channels")
|
||||
@Operation(summary = "배포 채널 선택", description = "이벤트를 배포할 채널을 선택합니다.")
|
||||
public ResponseEntity<ApiResponse<Void>> selectChannels(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@Valid @RequestBody SelectChannelsRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
@@ -384,7 +382,7 @@ public class EventController {
|
||||
@PutMapping("/{eventId}")
|
||||
@Operation(summary = "이벤트 수정", description = "기존 이벤트의 정보를 수정합니다. DRAFT 상태만 수정 가능합니다.")
|
||||
public ResponseEntity<ApiResponse<EventDetailResponse>> updateEvent(
|
||||
@PathVariable UUID eventId,
|
||||
@PathVariable String eventId,
|
||||
@Valid @RequestBody UpdateEventRequest request,
|
||||
@AuthenticationPrincipal UserPrincipal userPrincipal) {
|
||||
|
||||
|
||||
+1
-3
@@ -13,8 +13,6 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Job 컨트롤러
|
||||
*
|
||||
@@ -41,7 +39,7 @@ public class JobController {
|
||||
*/
|
||||
@GetMapping("/{jobId}")
|
||||
@Operation(summary = "Job 상태 조회", description = "비동기 작업의 상태를 조회합니다 (폴링 방식).")
|
||||
public ResponseEntity<ApiResponse<JobStatusResponse>> getJobStatus(@PathVariable UUID jobId) {
|
||||
public ResponseEntity<ApiResponse<JobStatusResponse>> getJobStatus(@PathVariable String jobId) {
|
||||
log.info("Job 상태 조회 API 호출 - jobId: {}", jobId);
|
||||
|
||||
JobStatusResponse response = jobService.getJobStatus(jobId);
|
||||
|
||||
Reference in New Issue
Block a user