Zimo 1 неделя назад
Родитель
Сommit
24af13734f

+ 3 - 3
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java

@@ -48,7 +48,7 @@ public class FileController {
         MultipartFile file = uploadReqVO.getFile();
         long size = file.getSize();
         String path = uploadReqVO.getPath();
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
         String format = ZonedDateTime.now().format(formatter);
         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 {
         MultipartFile file = uploadReqVO.getFile();
         String path = uploadReqVO.getPath();
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
         String format = ZonedDateTime.now().format(formatter);
         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 {
         MultipartFile file = uploadReqVO.getFile();
         String path = uploadReqVO.getPath();
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
         String format = ZonedDateTime.now().format(formatter);
         return success(fileService.createFile(format + file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())));
     }