From b1a3a9d023615c17d396cd41b3602508f5c0d0ff Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Tue, 22 Sep 2026 10:36:33 +0900 Subject: [PATCH 1/4] =?UTF-8?q?260922=5F01=5FENH:=20=EC=97=91=EC=85=80=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=8B=9C=20=EB=AA=A8=EB=8B=88?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=EB=B0=A9=EB=AC=B8=EC=9E=A5=EC=86=8C=20?= =?UTF-8?q?=ED=95=84=EC=88=98=20=ED=92=80=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kri/kmusical/manage/back/service/PerformanceService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java b/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java index 51df437..6efa294 100644 --- a/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java +++ b/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java @@ -567,7 +567,7 @@ public class PerformanceService { validateRequired(errors, rowNumber, "단체(인) 명", row.getArtistName()); validateRequired(errors, rowNumber, "사업 명", row.getPerformanceName()); - validateRequired(errors, rowNumber, "모니터링 방문 장소", row.getMonitoringAddress()); + //validateRequired(errors, rowNumber, "모니터링 방문 장소", row.getMonitoringAddress()); validateStaff(errors, rowNumber, "대표자", row.getOwnStaffName(), row.getOwnStaffTel1(), row.getOwnStaffTel2(), row.getOwnStaffEmail()); From 8904732b8067e35e03a0e48c2f492a3356b0d0d2 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Wed, 23 Sep 2026 10:49:03 +0900 Subject: [PATCH 2/4] =?UTF-8?q?260923=5F01=5FENH:=20=EC=9E=98=20=EB=AA=BB?= =?UTF-8?q?=EB=90=9C=20validation=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../persistence/repository/PerformanceAssignRepository.java | 2 -- .../com/kri/kmusical/manage/back/service/AssignService.java | 4 ---- 2 files changed, 6 deletions(-) diff --git a/src/main/java/com/kri/kmusical/manage/back/persistence/repository/PerformanceAssignRepository.java b/src/main/java/com/kri/kmusical/manage/back/persistence/repository/PerformanceAssignRepository.java index 97a3c16..ba42bf0 100644 --- a/src/main/java/com/kri/kmusical/manage/back/persistence/repository/PerformanceAssignRepository.java +++ b/src/main/java/com/kri/kmusical/manage/back/persistence/repository/PerformanceAssignRepository.java @@ -18,8 +18,6 @@ public interface PerformanceAssignRepository extends JpaRepository findByIdPerformanceIdAndIdReviewSlot( String performanceId, Integer reviewSlot diff --git a/src/main/java/com/kri/kmusical/manage/back/service/AssignService.java b/src/main/java/com/kri/kmusical/manage/back/service/AssignService.java index 54d7f53..efba413 100644 --- a/src/main/java/com/kri/kmusical/manage/back/service/AssignService.java +++ b/src/main/java/com/kri/kmusical/manage/back/service/AssignService.java @@ -152,10 +152,6 @@ public class AssignService { .with("performanceId", performanceId) .with("assignUser", assignUser); } - if (performanceAssignRepository.existsByAssignUserAndIdPerformanceIdNot(assignUser, performanceId)) { - throw BusinessException.conflict("ASSIGN_USER_ALREADY_CONFIRMED", "다른 공연에 이미 확정된 사용자입니다.") - .with("assignUser", assignUser); - } if (entity == null) { entity = new TPerformanceAssignEntity(); From cf99de9e14fabd4069d374702a4af3b08178c86e Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Mon, 28 Sep 2026 15:37:42 +0900 Subject: [PATCH 3/4] =?UTF-8?q?260928=5F01=5FENH:=20=EC=8B=A0=EC=B2=AD?= =?UTF-8?q?=EC=84=9C=20=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C=EB=93=9C/?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../back/common/consts/KmusicalConstant.java | 8 ++ .../back/config/FileStorageProperties.java | 1 + .../controller/PerformanceController.java | 31 ++++++ .../back/service/PerformanceService.java | 98 +++++++++++++++++++ src/main/resources/application.yml | 3 +- 5 files changed, 140 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java b/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java index 73a35f0..4910550 100644 --- a/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java +++ b/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java @@ -1,6 +1,7 @@ package com.kri.kmusical.manage.back.common.consts; import java.util.List; +import java.util.Map; public class KmusicalConstant { public static final String SYSTEM_USER_NAME = "SYSTEM"; @@ -11,5 +12,12 @@ public class KmusicalConstant { MONITORING_REVIEW_TYPE, CONSULTING_REVIEW_TYPE ); + + public static final Integer PUBLIC_OFFERING_REQUEST_FORM_TYPE = 1; + public static final Integer ISSUANCE_REQUEST_FORM_TYPE = 2; + public static final Map REQUEST_FORM_DETAIL_KEY = Map.of( + PUBLIC_OFFERING_REQUEST_FORM_TYPE, "PublicOfferingRequestForm", + ISSUANCE_REQUEST_FORM_TYPE, "IssuanceRequestForm" + ); public static final Integer COMPLETE_STATUS = 10; } diff --git a/src/main/java/com/kri/kmusical/manage/back/config/FileStorageProperties.java b/src/main/java/com/kri/kmusical/manage/back/config/FileStorageProperties.java index 60dfdca..63a88bf 100644 --- a/src/main/java/com/kri/kmusical/manage/back/config/FileStorageProperties.java +++ b/src/main/java/com/kri/kmusical/manage/back/config/FileStorageProperties.java @@ -10,4 +10,5 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class FileStorageProperties { private String reviewBaseDir; private String reviewTemplateBaseDir; + private String requestFormBaseDir; } diff --git a/src/main/java/com/kri/kmusical/manage/back/controller/PerformanceController.java b/src/main/java/com/kri/kmusical/manage/back/controller/PerformanceController.java index fa5d16b..16254c6 100644 --- a/src/main/java/com/kri/kmusical/manage/back/controller/PerformanceController.java +++ b/src/main/java/com/kri/kmusical/manage/back/controller/PerformanceController.java @@ -1,5 +1,6 @@ package com.kri.kmusical.manage.back.controller; +import static com.kri.kmusical.manage.back.common.util.DownloadHeaderUtil.attachmentContentDisposition; import static com.kri.kmusical.manage.back.common.util.ExcelResponseBuilder.buildExcelResponse; import com.kri.common.feature.datetime.DateTimeUtil; @@ -16,6 +17,8 @@ import jakarta.validation.Valid; import java.time.LocalDateTime; import java.util.List; import lombok.RequiredArgsConstructor; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; @@ -94,6 +97,27 @@ public class PerformanceController { return result; } + @Operation(summary = "공모신청서/교부신청서 업로드") + @PostMapping(value = "/request-form/upload/{performanceId}/{formType}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public String uploadRequestForm( + @PathVariable String performanceId, + @PathVariable Integer formType, + @RequestParam("file") MultipartFile file, + RequestUserContext ctx + ) { + return performanceService.uploadRequestForm( + performanceId, formType, file, ctx.getUserId(), DateTimeUtil.nowKstLocalDateTime()); + } + + @Operation(summary = "공모신청서/교부신청서 다운로드") + @GetMapping("/request-form/download/{performanceId}/{formType}") + public ResponseEntity downloadRequestForm( + @PathVariable String performanceId, + @PathVariable Integer formType + ) { + return download(performanceService.getRequestFormResource(performanceId, formType)); + } + @Operation(summary = "공연 정보 수정") @PatchMapping() public void updatePerformance( @@ -119,4 +143,11 @@ public class PerformanceController { performanceService.deletePerformance(performanceId, delId); systemEventLogService.writeDeletePerformanceLog(delId, now, ctx.getClientIp(), performanceId); } + + private ResponseEntity download(Resource resource) { + return ResponseEntity.ok() + .header(HttpHeaders.CONTENT_DISPOSITION, attachmentContentDisposition(resource.getFilename())) + .contentType(MediaType.APPLICATION_OCTET_STREAM) + .body(resource); + } } diff --git a/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java b/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java index 6efa294..3524a90 100644 --- a/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java +++ b/src/main/java/com/kri/kmusical/manage/back/service/PerformanceService.java @@ -1,5 +1,6 @@ package com.kri.kmusical.manage.back.service; +import static com.kri.kmusical.manage.back.common.consts.KmusicalConstant.REQUEST_FORM_DETAIL_KEY; import static com.kri.kmusical.manage.back.common.util.AppendCodeSheet.appendCodeSheet; import static java.util.stream.Collectors.toMap; @@ -10,6 +11,7 @@ import com.kri.common.feature.util.StringUtil; import com.kri.common.feature.web.BusinessException; import com.kri.kmusical.manage.back.common.util.ExcelUploadResultUtil; import com.kri.kmusical.manage.back.common.util.TelUtil; +import com.kri.kmusical.manage.back.config.FileStorageProperties; import com.kri.kmusical.manage.back.dto.common.CodeDto; import com.kri.kmusical.manage.back.dto.excel.ExcelErrorDto; import com.kri.kmusical.manage.back.dto.excel.ExcelUploadResultDto; @@ -28,6 +30,7 @@ import com.kri.kmusical.manage.back.persistence.entity.TPerformanceEntity; import com.kri.kmusical.manage.back.persistence.entity.TPerformanceMonitoringScheduleEntity; import com.kri.kmusical.manage.back.persistence.entity.TPerformanceReviewEntity; import com.kri.kmusical.manage.back.persistence.entity.TPerformanceStaffEntity; +import com.kri.kmusical.manage.back.persistence.entity.id.TPerformanceDetailEntityId; import com.kri.kmusical.manage.back.persistence.mapper.kon.KonMapper; import com.kri.kmusical.manage.back.persistence.repository.PerformanceAssignRepository; import com.kri.kmusical.manage.back.persistence.repository.PerformanceDetailRepository; @@ -36,6 +39,10 @@ import com.kri.kmusical.manage.back.persistence.repository.PerformanceRepository import com.kri.kmusical.manage.back.persistence.repository.PerformanceReviewRepository; import com.kri.kmusical.manage.back.persistence.repository.PerformanceStaffRepository; import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -52,6 +59,7 @@ import lombok.RequiredArgsConstructor; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.PathResource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; @@ -73,6 +81,7 @@ public class PerformanceService { private final CodeService codeService; private final AssignService assignService; private final ReviewService reviewService; + private final FileStorageProperties fileStorageProperties; @Value("${kon.survey-type:LIST}") private String surveyType; @@ -108,6 +117,95 @@ public class PerformanceService { .toList(); } + public String uploadRequestForm( + String performanceId, + Integer formType, + MultipartFile file, + String userId, + LocalDateTime now + ) { + String detailKey = requestFormDetailKey(formType); + getPerformanceEntity(performanceId); + if (file == null || file.isEmpty()) { + throw BusinessException.badRequest("EMPTY_FILE", "업로드된 파일이 없습니다."); + } + + String originalFileName = file.getOriginalFilename(); + if (!StringUtil.hasText(originalFileName)) { + throw BusinessException.badRequest("INVALID_FILE_NAME", "파일명이 없습니다."); + } + String fileName = Path.of(originalFileName).getFileName().toString(); + Path dir = requestFormDir(performanceId, formType); + Path target = requestFormPath(dir, fileName); + TPerformanceDetailEntityId detailId = new TPerformanceDetailEntityId(performanceId, detailKey); + TPerformanceDetailEntity detail = performanceDetailRepository.findById(detailId).orElse(null); + String oldFileName = detail == null ? null : detail.getPerformanceDetailValue(); + + try { + Files.createDirectories(dir); + Path stagedFile = Files.createTempFile(dir, "request-form-", ".tmp"); + try { + file.transferTo(stagedFile.toFile()); + Files.move(stagedFile, target, StandardCopyOption.REPLACE_EXISTING); + } finally { + Files.deleteIfExists(stagedFile); + } + if (detail == null) { + detail = TPerformanceDetailEntity.update(performanceId, detailKey, fileName, userId, now); + } else { + detail.setPerformanceDetailValue(fileName); + detail.setModUser(userId); + detail.setModDt(now); + } + performanceDetailRepository.save(detail); + if (StringUtil.hasText(oldFileName) && !oldFileName.equals(fileName)) { + Files.deleteIfExists(requestFormPath(dir, oldFileName)); + } + return fileName; + } catch (IOException e) { + throw BusinessException.internalError("REQUEST_FORM_SAVE_FAILED", "신청서 파일 저장 중 오류가 발생했습니다."); + } + } + + public PathResource getRequestFormResource(String performanceId, Integer formType) { + String detailKey = requestFormDetailKey(formType); + TPerformanceDetailEntityId detailId = new TPerformanceDetailEntityId(performanceId, detailKey); + String fileName = performanceDetailRepository.findById(detailId) + .map(TPerformanceDetailEntity::getPerformanceDetailValue) + .orElseThrow(() -> BusinessException.notFound("REQUEST_FORM_NOT_FOUND", "신청서 파일이 없습니다.")); + Path file = requestFormPath(requestFormDir(performanceId, formType), fileName); + if (!Files.isRegularFile(file)) { + throw BusinessException.notFound("REQUEST_FORM_NOT_FOUND", "신청서 파일이 없습니다."); + } + return new PathResource(file); + } + + private String requestFormDetailKey(Integer formType) { + String detailKey = formType == null ? null : REQUEST_FORM_DETAIL_KEY.get(formType); + if (detailKey != null) { + return detailKey; + } + throw BusinessException.badRequest("INVALID_REQUEST_FORM_TYPE", "유효하지 않은 신청서 유형입니다.") + .with("formType", formType); + } + + private Path requestFormDir(String performanceId, Integer formType) { + Path baseDir = Path.of(fileStorageProperties.getRequestFormBaseDir()).toAbsolutePath().normalize(); + Path dir = baseDir.resolve(performanceId).resolve(String.valueOf(formType)).normalize(); + if (!dir.startsWith(baseDir)) { + throw BusinessException.badRequest("INVALID_PERFORMANCE_ID", "유효하지 않은 공연 ID입니다."); + } + return dir; + } + + private Path requestFormPath(Path dir, String fileName) { + Path target = dir.resolve(fileName).normalize(); + if (!target.startsWith(dir) || target.equals(dir)) { + throw BusinessException.badRequest("INVALID_FILE_NAME", "유효하지 않은 파일명입니다."); + } + return target; + } + @Transactional public ExcelUploadResultDto createPerformancesFromExcel( MultipartFile file, diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 73dd8ca..511ac85 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -73,6 +73,7 @@ kri: file: review-base-dir: ./upload-file/review review-template-base-dir: ./upload-file/review-template + request-form-base-dir: ./upload-file/request-form resource-pattern: /files/** pdf-converter-command: soffice @@ -81,4 +82,4 @@ kri: redis: enabled: false # RedisQueueHelper 사용 시 true scheduling: - enabled: false # @Scheduled 사용 시 true \ No newline at end of file + enabled: false # @Scheduled 사용 시 true From 3c796652789c188e862b218d9e32d427c0d63326 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Tue, 29 Sep 2026 15:57:02 +0900 Subject: [PATCH 4/4] =?UTF-8?q?260929=5F01=5FENH:=20=EB=AA=A8=EB=8B=88?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=ED=8F=89=EA=B0=80=EC=96=91=EC=8B=9D?= =?UTF-8?q?=EC=97=90=20classification=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../back/common/consts/KmusicalConstant.java | 2 + .../back/controller/ReviewController.java | 13 +++-- .../back/service/ReviewTemplateService.java | 48 ++++++++++++++----- 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java b/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java index 4910550..180c683 100644 --- a/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java +++ b/src/main/java/com/kri/kmusical/manage/back/common/consts/KmusicalConstant.java @@ -20,4 +20,6 @@ public class KmusicalConstant { ISSUANCE_REQUEST_FORM_TYPE, "IssuanceRequestForm" ); public static final Integer COMPLETE_STATUS = 10; + + public static final List REVIEW_CLASSIFICATION = List.of(1, 2); } diff --git a/src/main/java/com/kri/kmusical/manage/back/controller/ReviewController.java b/src/main/java/com/kri/kmusical/manage/back/controller/ReviewController.java index 244a9d9..6714b8e 100644 --- a/src/main/java/com/kri/kmusical/manage/back/controller/ReviewController.java +++ b/src/main/java/com/kri/kmusical/manage/back/controller/ReviewController.java @@ -100,25 +100,28 @@ public class ReviewController { @PostMapping(value = "/template/upload/{reviewType}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public String uploadReviewTemplate( @PathVariable Integer reviewType, + @RequestParam(required = false) Integer classification, @RequestParam("file") MultipartFile file ) { - return reviewTemplateService.uploadReviewTemplate(reviewType, file); + return reviewTemplateService.uploadReviewTemplate(reviewType, classification, file); } @Operation(summary = "평가양식 다운로드") @GetMapping("/template/download/{reviewType}") public ResponseEntity downloadReviewTemplate( - @PathVariable Integer reviewType + @PathVariable Integer reviewType, + @RequestParam(required = false) Integer classification ) { - return download(reviewTemplateService.getReviewTemplateResource(reviewType)); + return download(reviewTemplateService.getReviewTemplateResource(reviewType, classification)); } @Operation(summary = "평가양식 pdf 다운로드") @GetMapping("/template/pdf/{reviewType}") public ResponseEntity downloadReviewPdfTemplate( - @PathVariable Integer reviewType + @PathVariable Integer reviewType, + @RequestParam(required = false) Integer classification ) { - return download(reviewTemplateService.getReviewTemplatePdfResource(reviewType)); + return download(reviewTemplateService.getReviewTemplatePdfResource(reviewType, classification)); } private ResponseEntity download(Resource resource) { diff --git a/src/main/java/com/kri/kmusical/manage/back/service/ReviewTemplateService.java b/src/main/java/com/kri/kmusical/manage/back/service/ReviewTemplateService.java index 329f13a..c19eb10 100644 --- a/src/main/java/com/kri/kmusical/manage/back/service/ReviewTemplateService.java +++ b/src/main/java/com/kri/kmusical/manage/back/service/ReviewTemplateService.java @@ -1,5 +1,7 @@ package com.kri.kmusical.manage.back.service; +import static com.kri.kmusical.manage.back.common.consts.KmusicalConstant.MONITORING_REVIEW_TYPE; +import static com.kri.kmusical.manage.back.common.consts.KmusicalConstant.REVIEW_CLASSIFICATION; import static com.kri.kmusical.manage.back.common.consts.KmusicalConstant.REVIEW_TYPE; import com.kri.common.feature.util.StringUtil; @@ -35,14 +37,19 @@ public class ReviewTemplateService extends AbstractFileService { .normalize(); } - public String uploadReviewTemplate(Integer reviewType, MultipartFile file) { + public String uploadReviewTemplate(Integer reviewType, Integer classification, MultipartFile file) { validateReviewTemplateType(reviewType); + + if(MONITORING_REVIEW_TYPE.equals(reviewType)){ + validateReviewTemplateClassification(classification); + } + if (file == null || file.isEmpty()) { throw BusinessException.badRequest("EMPTY_FILE", "업로드된 파일이 없습니다."); } String fileName = sanitizeFileName(file.getOriginalFilename()); - Path dir = templateDir(reviewType); + Path dir = templateDir(reviewType, classification); try { deleteExistingFiles(dir); @@ -55,20 +62,24 @@ public class ReviewTemplateService extends AbstractFileService { } } - public PathResource getReviewTemplateResource(Integer reviewType) { - Path file = findReviewTemplateFile(reviewType, false); + public PathResource getReviewTemplateResource(Integer reviewType, Integer classification) { + Path file = findReviewTemplateFile(reviewType, classification, false); return new PathResource(file); } - public PathResource getReviewTemplatePdfResource(Integer reviewType) { - Path file = findReviewTemplateFile(reviewType, true); + public PathResource getReviewTemplatePdfResource(Integer reviewType, Integer classification) { + Path file = findReviewTemplateFile(reviewType, classification, true); return new PathResource(file); } - private Path findReviewTemplateFile(Integer reviewType, boolean pdf) { + private Path findReviewTemplateFile(Integer reviewType, Integer classification, boolean pdf) { validateReviewTemplateType(reviewType); - Path dir = templateDir(reviewType); + if(MONITORING_REVIEW_TYPE.equals(reviewType)){ + validateReviewTemplateClassification(classification); + } + + Path dir = templateDir(reviewType, classification); if (!Files.isDirectory(dir)) { throw BusinessException.notFound("REVIEW_TEMPLATE_NOT_FOUND", "평가양식 파일이 없습니다.") .with("reviewType", reviewType); @@ -140,11 +151,15 @@ public class ReviewTemplateService extends AbstractFileService { return ".pdf".equalsIgnoreCase(extractExtension(fileName)); } - private Path templateDir(Integer reviewType) { - return getBaseDir() - .resolve(String.valueOf(reviewType)) - .toAbsolutePath() - .normalize(); + private Path templateDir(Integer reviewType, Integer classification) { + Path dir = getBaseDir() + .resolve(String.valueOf(reviewType)); + + if (MONITORING_REVIEW_TYPE.equals(reviewType) && classification != null) { + dir = dir.resolve(String.valueOf(classification)); + } + + return dir.toAbsolutePath().normalize(); } private void validateReviewTemplateType(Integer reviewType) { @@ -154,6 +169,13 @@ public class ReviewTemplateService extends AbstractFileService { } } + private void validateReviewTemplateClassification(Integer classification) { + if (!REVIEW_CLASSIFICATION.contains(classification)) { + throw BusinessException.badRequest("INVALID_REVIEW_TEMPLATE_CLASSIFICATION", "유효하지 않은 평가양식 분류입니다.") + .with("classification", classification); + } + } + private String sanitizeFileName(String originalFileName) { if (StringUtil.isNullOrBlank(originalFileName)) { return "review-template";