2 Commits 2cc23e1192 ... 8ebf14290e

Autor SHA1 Mensaje Fecha
  gydx_2024_lyh 8ebf14290e Merge remote-tracking branch 'origin/master' hace 1 mes
  gydx_2024_lyh 5eaf65a2f0 lyh hace 1 mes

+ 15 - 15
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/enterprise/base/controller/TECompareobjectRepeatController.java

@@ -47,8 +47,8 @@ public class TECompareobjectRepeatController extends BaseController
     private ITECompareobjectRepeatService tECompareobjectRepeatService;
 
 
-//    String base = "/usr/local/nginx/html/";
-String base ="C:\\Program Files\\north\\image\\";
+    String base = "/usr/local/nginx/html/files/";
+//String base ="C:\\Program Files\\north\\image\\";
     String ip="8.130.113.97";
     String port="20000";
     @PostMapping(value = "/code/{id}")
@@ -66,19 +66,19 @@ String base ="C:\\Program Files\\north\\image\\";
         String password = "sys200888";                      // 远程服务器密码
         int port = 22;
         String port2 = "20000";
-        File localFile = new File(path);
-        if (!localFile.exists()) {
-            System.out.println("本地文件不存在: " + path);
-        }
-
-        try (FileInputStream fis = new FileInputStream(localFile)) {
-            // 调用工具类上传文件
-            SFTPFileUpload.uploadFile(fis, remoteDir, remoteHost, username, password, port, localFile.getName());
-            System.out.println("文件上传11");
-        } catch (IOException e) {
-            e.printStackTrace();
-            System.out.println("文件上传失败");
-        }
+//        File localFile = new File(path);
+//        if (!localFile.exists()) {
+//            System.out.println("本地文件不存在: " + path);
+//        }
+//
+//        try (FileInputStream fis = new FileInputStream(localFile)) {
+//            // 调用工具类上传文件
+//            SFTPFileUpload.uploadFile(fis, remoteDir, remoteHost, username, password, port, localFile.getName());
+//            System.out.println("文件上传11");
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//            System.out.println("文件上传失败");
+//        }
 
 
         String url = "http://" + ip + ":" + port2 + "/files/files/" + id + ".png";