瀏覽代碼

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

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);