영상관리 -> 파일리스트 조회 추가
This commit is contained in:
@@ -4,6 +4,8 @@ import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
|
||||
import com.kamco.cd.kamcoback.code.service.CommonCodeService;
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FilesDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -34,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Tag(name = "영상 관리", description = "영상 관리 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping({"/demo/mapsheet", "/api/mapsheet"})
|
||||
@RequestMapping({"/api/mapsheet"})
|
||||
public class MapSheetMngApiController {
|
||||
|
||||
private final CommonCodeService commonCodeService;
|
||||
@@ -53,16 +55,36 @@ public class MapSheetMngApiController {
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/folders")
|
||||
@PostMapping("/getFolders")
|
||||
public ApiResponseDto<List<FileDto.FolderDto>> getDir(
|
||||
@RequestParam String dirPath,
|
||||
@Parameter(schema = @Schema(allowableValues = {"geojson", "prj", "shp", "shx","*"}))
|
||||
@RequestParam String extension
|
||||
@RequestParam String dirPath
|
||||
) {
|
||||
|
||||
return ApiResponseDto.createOK(mapSheetMngService.getFolderAll(dirPath));
|
||||
}
|
||||
|
||||
@Operation(summary = "파일목록 조회", description = "파일목록 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/getFiles")
|
||||
public ApiResponseDto<FilesDto> getFiles(
|
||||
@RequestBody SrchDto srchDto
|
||||
) {
|
||||
|
||||
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user