Pārlūkot izejas kodu

修改分页问题

Administrator 1 gadu atpakaļ
vecāks
revīzija
32b1500496

+ 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();
         }