중복파일삭제 수정
This commit is contained in:
@@ -161,5 +161,26 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findHstUidToMapSheetFileList(hstUid));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상관리 > 파일삭제", description = "영상관리 > 파일삭제")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "파일삭제 처리 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Long.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PutMapping("/del-mng-files")
|
||||
public ApiResponseDto<MapSheetMngDto.DmlReturn> deleteByFileUidMngFile(@RequestParam @Valid List<Long> fileUids) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.deleteByFileUidMngFile(fileUids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ public class MapSheetMngFileCheckerApiController {
|
||||
return ApiResponseDto.createOK(mapSheetMngFileCheckerService.getFilesAll(srchDto));
|
||||
}
|
||||
|
||||
/*
|
||||
@Operation(summary = "파일 업로드", description = "파일 업로드 및 TIF 검증")
|
||||
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public ApiResponseDto<String> uploadFile(
|
||||
@@ -83,6 +84,9 @@ public class MapSheetMngFileCheckerApiController {
|
||||
mapSheetMngFileCheckerService.uploadFile(file, targetPath, overwrite, hstUid));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
@Operation(summary = "파일 삭제", description = "중복 파일 등 파일 삭제")
|
||||
@PostMapping("/delete")
|
||||
public ApiResponseDto<Boolean> deleteFile(@RequestBody SrchFoldersDto dto) {
|
||||
@@ -97,6 +101,8 @@ public class MapSheetMngFileCheckerApiController {
|
||||
mapSheetMngFileCheckerService.deleteDuplicate(filePath, fileName));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
@Operation(summary = "지정폴더(하위폴더포함) 파일목록 조회", description = "지정폴더(하위폴더포함) 파일목록 조회")
|
||||
@ApiResponses(
|
||||
|
||||
@@ -324,4 +324,15 @@ public class MapSheetMngService {
|
||||
return mapSheetMngCoreService.findHstUidToMapSheetFileList(hstUid);
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public MapSheetMngDto.DmlReturn deleteByFileUidMngFile(List<Long> fileUids) {
|
||||
|
||||
for (Long uid : fileUids) {
|
||||
MapSheetMngDto.DmlReturn dmlReturn = mapSheetMngCoreService.deleteByFileUidMngFile(uid);
|
||||
}
|
||||
|
||||
return new MapSheetMngDto.DmlReturn("success", fileUids.size() + "개 파일이 삭제되었습니다.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user