From 13d2bd6a27f941cfd8f096a7ae2def858a565363 Mon Sep 17 00:00:00 2001
From: zhibing.pu <393733352@qq.com>
Date: 星期三, 04 九月 2024 11:01:34 +0800
Subject: [PATCH] 修改2.0 bug

---
 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
index 45b01c4..7ba230c 100644
--- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
+++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
@@ -297,12 +297,12 @@
                 EmailUtil.send(email, language == 1 ? "邮箱验证" : language == 2 ? "Verification code" : "Code de validation",  document.html());
 
                 //开始生成pdf收据和html收据
-                File file = new File("/usr/local/nginx/html/files/html/");
+                File file = new File("/home/igotechgh/nginx/html/files/html/");
                 if(!file.exists()){
                     file.mkdirs();
                 }
                 String randomString = ToolUtil.getRandomString(10);
-                file = new File("/usr/local/nginx/html/files/html/mainbox_" + randomString + ".html");
+                file = new File("/home/igotechgh/nginx/html/files/html/mainbox_" + randomString + ".html");
                 if(!file.exists()){
                     file.createNewFile();
                 }
@@ -311,7 +311,7 @@
                 fileWriter.flush();
                 fileWriter.close();
 
-                String link ="http://182.160.16.251:81/files/html/mainbox_" + randomString + ".html";
+                String link ="https://igo.i-go.group/files/html/mainbox_" + randomString + ".html";
                 TEmail tEmail = new TEmail();
                 tEmail.setLink(link);
                 tEmail.setUserId(uid);
@@ -1181,12 +1181,12 @@
 
     @ResponseBody
     @RequestMapping("/base/user/image")
-    public String image(@RequestPart("file") MultipartFile file) {
+    public ResultUtil image(@RequestPart("file") MultipartFile file) {
         try {
-            String pictureName = OBSUploadUtil.inputStreamUpload(file);
-            return pictureName;
-        } catch (IOException e1) {
-            return null;
+            String pictureName = GoogleCloudStorageUtil.upload(file);
+            return ResultUtil.success(pictureName);
+        } catch (Exception e1) {
+            return ResultUtil.runErr();
         }
     }
 
@@ -1332,10 +1332,10 @@
         ServletOutputStream outputStream = null;
         try {
             if(orderType == 1){
-                fileInputStream = new FileInputStream(new File("/usr/local/nginx/html/files/pdf/ride_receipt_" + orderId + ".pdf"));
+                fileInputStream = new FileInputStream(new File("/home/igotechgh/nginx/html/files/pdf/ride_receipt_" + orderId + ".pdf"));
             }
             if(orderType == 4){
-                fileInputStream = new FileInputStream(new File("/usr/local/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf"));
+                fileInputStream = new FileInputStream(new File("/home/igotechgh/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf"));
             }
             BufferedInputStream bf = new BufferedInputStream(fileInputStream);
             outputStream = response.getOutputStream();
@@ -1400,7 +1400,7 @@
                 public void run() {
                     Process process = null;
                     try {
-                        process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName + ".mp3");
+                        process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName + ".mp3");
                     } catch (IOException e) {
                         throw new RuntimeException(e);
                     }

--
Gitblit v1.7.1