From 7ab1fcfdd4facfdafac50dc06804408e4559dba7 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期一, 24 二月 2025 08:20:49 +0800
Subject: [PATCH] fix : 查询出场接口修改

---
 src/main/java/com/boying/controller/phone/UpdateAppController.java |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/boying/controller/phone/UpdateAppController.java b/src/main/java/com/boying/controller/phone/UpdateAppController.java
index de14b69..bd84a29 100644
--- a/src/main/java/com/boying/controller/phone/UpdateAppController.java
+++ b/src/main/java/com/boying/controller/phone/UpdateAppController.java
@@ -1,27 +1,29 @@
 package com.boying.controller.phone;
 
+import cn.hutool.core.io.IoUtil;
 import com.boying.common.R;
+import com.boying.common.SystemConfigProperties;
 import com.boying.entity.UpdateApp;
 import com.boying.service.UpdateAppService;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
 import java.util.List;
 
 @RestController
 @RequestMapping("ffzf/updateApp")
 @RequiredArgsConstructor
-@Tag(description = "ffzf/updateApp" , name = "app鏇存柊鎺ュ彛" )
 public class UpdateAppController{
 
     private final UpdateAppService updateAppService;
+    private final SystemConfigProperties systemConfigProperties;
 
     @PostMapping("/getUpdateApp")
-    @Operation(summary = "鑾峰彇鏈�鏂癮pp鐗堟湰" , description = "鑾峰彇鏈�鏂癮pp鐗堟湰" )
     public Object getUpdateApp(){
         List<UpdateApp> all = updateAppService.list();
         if(all.size()==0){
@@ -29,4 +31,15 @@
         }
         return R.ok(all.get(0));
     }
+    @GetMapping("/getFile/{filename}")
+    public void getFile(@PathVariable String filename, HttpServletResponse response){
+        try {
+            InputStream input = new FileInputStream(new File(systemConfigProperties.getUploadImgPath()+filename));
+            response.setContentType("application/octet-stream; charset=UTF-8");
+            IoUtil.copy(input, response.getOutputStream());
+        }catch (Exception e){
+            System.out.println("鏂囦欢璇诲彇寮傚父锛�"+e.getLocalizedMessage());
+        }
+    }
+
 }

--
Gitblit v1.9.1