diff --git a/src/main/java/zipdabang/server/service/RootService.java b/src/main/java/zipdabang/server/service/RootService.java index 91a052b..3dd8847 100644 --- a/src/main/java/zipdabang/server/service/RootService.java +++ b/src/main/java/zipdabang/server/service/RootService.java @@ -28,7 +28,7 @@ public interface RootService { Optional findPushAlarmById(Long pushAlarmId); - void ParseExcelFile(MultipartFile file) throws IOException; +// void ParseExcelFile(MultipartFile file) throws IOException; public boolean isNicknameContainsSlangWord(String nickname); public boolean isNicknameReservedWord(String nickname); } diff --git a/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java b/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java index bc9ae37..b85107e 100644 --- a/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java +++ b/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java @@ -151,44 +151,45 @@ public Optional findPushAlarmById(Long pushAlarmId) { return pushAlarmRepository.findById(pushAlarmId); } - @Override - @Transactional - public void ParseExcelFile(MultipartFile inputFile) throws IOException{ - InputStream file = inputFile.getInputStream(); - Workbook workbook = WorkbookFactory.create(file); - Sheet sheet = workbook.getSheetAt(0); - - // 비속어 저장 - for (int i=0;i readPushAlarm(@CheckTempMember } - @Operation(summary = "닉네임 필터링용 엑셀 파싱 API ✔️🔑", description = "닉네임 필터링용 엑셀 파싱 API") - @PostMapping(value = "/excel", consumes = {MediaType.MULTIPART_FORM_DATA_VALUE}) -// @Parameters({ -// @Parameter(name = "member", hidden = true) +// @Operation(summary = "닉네임 필터링용 엑셀 파싱 API ✔️", description = "닉네임 필터링용 엑셀 파싱 API") +// @PostMapping(value = "/excel", consumes = {MediaType.MULTIPART_FORM_DATA_VALUE}) +// @ApiResponses({ +// @ApiResponse(responseCode = "2000", description = "OK 성공"), // }) - @ApiResponses({ - @ApiResponse(responseCode = "2000", description = "OK 성공"), - }) - public ResponseDto parsingExcelFile(@ModelAttribute MultipartFile file) throws IOException{ - // 멤버 id가 3이면 가능하도록 넣기 - // resources에 엑셀 파일 넣고 해당 경로로 파일 찾기. - // 파싱해서 닉네임들 다 db 만들어서 저장하기. - // valid 어노테이션에서 필터링. - rootService.ParseExcelFile(file); - return null; - } +// public ResponseDto parsingExcelFile(@ModelAttribute MultipartFile file) throws IOException{ +// rootService.ParseExcelFile(file); +// return null; +// } }