|
@@ -48,7 +48,7 @@ public class FileController {
|
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
|
long size = file.getSize();
|
|
long size = file.getSize();
|
|
|
String path = uploadReqVO.getPath();
|
|
String path = uploadReqVO.getPath();
|
|
|
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
|
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
|
|
|
String format = ZonedDateTime.now().format(formatter);
|
|
String format = ZonedDateTime.now().format(formatter);
|
|
|
return success(ImmutableMap.of("path",fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())),"size",size));
|
|
return success(ImmutableMap.of("path",fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())),"size",size));
|
|
|
}
|
|
}
|
|
@@ -58,7 +58,7 @@ public class FileController {
|
|
|
public CommonResult<String> uploadFilePath(FileUploadReqVO uploadReqVO) throws Exception {
|
|
public CommonResult<String> uploadFilePath(FileUploadReqVO uploadReqVO) throws Exception {
|
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
|
String path = uploadReqVO.getPath();
|
|
String path = uploadReqVO.getPath();
|
|
|
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
|
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
|
|
|
String format = ZonedDateTime.now().format(formatter);
|
|
String format = ZonedDateTime.now().format(formatter);
|
|
|
return success(fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())));
|
|
return success(fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())));
|
|
|
}
|
|
}
|
|
@@ -68,7 +68,7 @@ public class FileController {
|
|
|
public CommonResult<String> uploadQhseFilePath(FileUploadReqVO uploadReqVO) throws Exception {
|
|
public CommonResult<String> uploadQhseFilePath(FileUploadReqVO uploadReqVO) throws Exception {
|
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
|
String path = uploadReqVO.getPath();
|
|
String path = uploadReqVO.getPath();
|
|
|
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
|
|
|
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
|
|
|
String format = ZonedDateTime.now().format(formatter);
|
|
String format = ZonedDateTime.now().format(formatter);
|
|
|
return success(fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())));
|
|
return success(fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())));
|
|
|
}
|
|
}
|