소스 검색

修改分页问题

Administrator 1 년 전
부모
커밋
32b1500496
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateDispositionServiceImpl.java

+ 4 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/InvestigateDispositionServiceImpl.java

@@ -116,7 +116,10 @@ public class InvestigateDispositionServiceImpl implements IInvestigateDispositio
         String path = url.replace("/profile", getProfile());
         // 删除原先的文件
         try {
-            Runtime.getRuntime().exec("rm -f " + path);
+            File file = new File(path);
+            if (file.exists()){
+                Runtime.getRuntime().exec("rm -f " + path);
+            }
         } catch (IOException e) {
             e.printStackTrace();
         }