From 277b5047d00a3e9094bafd5ecb078976fbf6a92d Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期四, 08 一月 2026 18:59:04 +0800
Subject: [PATCH] 华玺砂浆转移-采购代码、发货和发货审核、报修和报修审核、采购模板,查询采购模板接口、财务管理的存货核算数据接口、财务管理的固定资产核算获取台账接口、采购审批,接口、客户分类字段、采购台账字段,实现采购异常记录的添加接口、黑名单,添加资质管理字段,可上传资质文件-至军泰伟业

---
 src/main/java/com/ruoyi/project/common/CommonController.java |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/ruoyi/project/common/CommonController.java b/src/main/java/com/ruoyi/project/common/CommonController.java
index d5a6bcf..21fa5ec 100644
--- a/src/main/java/com/ruoyi/project/common/CommonController.java
+++ b/src/main/java/com/ruoyi/project/common/CommonController.java
@@ -1,9 +1,15 @@
 package com.ruoyi.project.common;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.basic.service.StorageBlobService;
+import com.ruoyi.framework.web.domain.R;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -26,6 +32,7 @@
  * 
  * @author ruoyi
  */
+@Api(tags = "閫氱敤鎺ュ彛")
 @RestController
 @RequestMapping("/common")
 public class CommonController
@@ -52,16 +59,15 @@
             {
                 throw new Exception(StringUtils.format("鏂囦欢鍚嶇О({})闈炴硶锛屼笉鍏佽涓嬭浇銆� ", fileName));
             }
-            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
-            String filePath = RuoYiConfig.getDownloadPath() + fileName;
+            String realFileName =  fileName.substring(fileName.indexOf("_") + 1);
 
             response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
             FileUtils.setAttachmentResponseHeader(response, realFileName);
-            FileUtils.writeBytes(filePath, response.getOutputStream());
-            if (delete)
-            {
-                FileUtils.deleteFile(filePath);
-            }
+            FileUtils.writeBytes(fileName, response.getOutputStream());
+//            if (delete)
+//            {
+//                FileUtils.deleteFile(fileName);
+//            }
         }
         catch (Exception e)
         {
@@ -69,6 +75,20 @@
         }
     }
 
+    @Autowired
+    private StorageBlobService storageBlobService;
+
+
+    /**
+     * minio閫氱敤涓婁紶璇锋眰锛堝涓級
+     */
+    @PostMapping("/minioUploads")
+    @ApiOperation(value = "minio閫氱敤涓婁紶璇锋眰")
+    public AjaxResult minioUploadFiles(List<MultipartFile> files, String bucketName, Long type) throws Exception
+    {
+        return AjaxResult.success(storageBlobService.updateStorageBlobs(files, bucketName,type));
+    }
+
     /**
      * 閫氱敤涓婁紶璇锋眰锛堝崟涓級
      */

--
Gitblit v1.9.3