소스 검색

简历管理代码联调测试问题修改。

zhanglfluofei 8 달 전
부모
커밋
c8cb1e6ec4
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/ResumeController.java

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/ResumeController.java

@@ -112,12 +112,13 @@ public class ResumeController extends BaseController
             String originalFilename = file.getOriginalFilename();
             String suffix = originalFilename.substring(originalFilename.lastIndexOf("."));
             String fileName = FileUploadUtils.upload(path, file);
+            String newFileName = com.ruoyi.common.utils.file.FileUtils.getName(fileName);
 
             // 上传位置
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
             String ymd = sdf.format(new Date());
             String lastPath = "/" + ymd + "/";
-            String fileUrl = path + lastPath + fileName;
+            String fileUrl = path + lastPath + newFileName;
 
             if(suffix.equals(".doc")||suffix.equals(".docx")){
                 List<String> content = null;
@@ -134,7 +135,6 @@ public class ResumeController extends BaseController
                 Resume resume = ResumeAnalysisUtil.toResumeAnalysis(content);
                 //处理文件信息
                 String url = serverConfig.getUrl() + fileName;
-                String newFileName = com.ruoyi.common.utils.file.FileUtils.getName(fileName);
                 ResumeFile resumeFile = new ResumeFile();
                 resumeFile.setUploadPath(url);
                 resumeFile.setUploadName(newFileName);