-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] Project Excel API 구현 완료 (#115)
* feat: 프로젝트일괄등록양식 다운로드 API 구현, 테스트 작성 * feat: 프로젝트 엑셀 일괄등록 컨트롤러, 테스트 작성 * feat: 엑셀 일괄 등록 컨트롤러, 테스트 작성 * feat: 엑셀 일괄 등록 구현 * docs: html 문서 업데이트 * chore: gitignore 파일 수정' * chore: 의미 없는 공백 제거 * fix: 비어있는 행 판별 오류 수정 * fix: 한글 문자열 비교 오류 수정 * fix: 빈 행 오류 수정 * docs: restdocs 문서 전체 업데이트
- Loading branch information
Showing
43 changed files
with
6,309 additions
and
820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/com/scg/stop/project/controller/ProjectExcelController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.scg.stop.project.controller; | ||
|
||
import com.scg.stop.auth.annotation.AuthUser; | ||
import com.scg.stop.project.dto.response.FileResponse; | ||
import com.scg.stop.project.dto.response.ProjectExcelResponse; | ||
import com.scg.stop.project.service.ProjectExcelService; | ||
import com.scg.stop.user.domain.AccessType; | ||
import com.scg.stop.user.domain.User; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestPart; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import java.util.List; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/projects/excel") | ||
public class ProjectExcelController { | ||
|
||
private final ProjectExcelService projectExcelService; | ||
|
||
@PostMapping | ||
public ResponseEntity<ProjectExcelResponse> createProjectExcel( | ||
@RequestPart("excel") MultipartFile excelFile, | ||
@RequestPart("thumbnails") List<FileResponse> thumbnails, | ||
@RequestPart("posters") List<FileResponse> posters, | ||
@AuthUser(accessType = {AccessType.ADMIN}) User user | ||
) { | ||
ProjectExcelResponse projectExcelResponse = projectExcelService.createProjectExcel(excelFile, thumbnails, posters); | ||
return ResponseEntity.status(HttpStatus.CREATED).body(projectExcelResponse); | ||
} | ||
} |
Oops, something went wrong.