mirror of
https://github.com/won-ktds/smarketing-backend.git
synced 2025-12-06 07:06:24 +00:00
feat: save poster content
This commit is contained in:
parent
436e52027e
commit
934ad742d4
@ -19,7 +19,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,7 +70,7 @@ public class PosterContentService implements PosterContentUseCase {
|
|||||||
* @param request 포스터 콘텐츠 저장 요청
|
* @param request 포스터 콘텐츠 저장 요청
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public Content savePosterContent(PosterContentSaveRequest request) {
|
public void savePosterContent(PosterContentSaveRequest request) {
|
||||||
// 생성 조건 구성
|
// 생성 조건 구성
|
||||||
CreationConditions conditions = CreationConditions.builder()
|
CreationConditions conditions = CreationConditions.builder()
|
||||||
.category(request.getCategory())
|
.category(request.getCategory())
|
||||||
@ -87,7 +86,7 @@ public class PosterContentService implements PosterContentUseCase {
|
|||||||
.contentType(ContentType.POSTER)
|
.contentType(ContentType.POSTER)
|
||||||
.platform(Platform.GENERAL)
|
.platform(Platform.GENERAL)
|
||||||
.title(request.getTitle())
|
.title(request.getTitle())
|
||||||
// .content(request.gen)
|
.content(request.getContent())
|
||||||
.images(request.getImages())
|
.images(request.getImages())
|
||||||
.status(ContentStatus.PUBLISHED)
|
.status(ContentStatus.PUBLISHED)
|
||||||
.creationConditions(conditions)
|
.creationConditions(conditions)
|
||||||
@ -95,6 +94,6 @@ public class PosterContentService implements PosterContentUseCase {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// 저장
|
// 저장
|
||||||
return contentRepository.save(content);
|
contentRepository.save(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -26,5 +26,5 @@ public interface PosterContentUseCase {
|
|||||||
* 포스터 콘텐츠 저장
|
* 포스터 콘텐츠 저장
|
||||||
* @param request 포스터 콘텐츠 저장 요청
|
* @param request 포스터 콘텐츠 저장 요청
|
||||||
*/
|
*/
|
||||||
Content savePosterContent(PosterContentSaveRequest request);
|
void savePosterContent(PosterContentSaveRequest request);
|
||||||
}
|
}
|
||||||
@ -29,9 +29,6 @@ public class PosterContentSaveRequest {
|
|||||||
@Schema(description = "선택된 포스터 이미지 URL")
|
@Schema(description = "선택된 포스터 이미지 URL")
|
||||||
private List<String> images;
|
private List<String> images;
|
||||||
|
|
||||||
@Schema(description = "발행 상태", example = "PUBLISHED")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
@Schema(description = "콘텐츠 카테고리", example = "이벤트")
|
@Schema(description = "콘텐츠 카테고리", example = "이벤트")
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user