From e6ab9700027f6b1a1fca78090326d01ef4664183 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期六, 12 十一月 2022 09:10:20 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/service/show/ExportService.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/lf/server/service/show/ExportService.java b/src/main/java/com/lf/server/service/show/ExportService.java
index 400573f..4c3f51e 100644
--- a/src/main/java/com/lf/server/service/show/ExportService.java
+++ b/src/main/java/com/lf/server/service/show/ExportService.java
@@ -2,6 +2,7 @@
 
 import com.alibaba.fastjson.JSON;
 import com.lf.server.entity.all.ResponseMsg;
+import com.lf.server.entity.all.StaticData;
 import com.lf.server.entity.data.DownloadEntity;
 import com.lf.server.entity.show.ExportEntity;
 import com.lf.server.entity.sys.UserEntity;
@@ -52,7 +53,7 @@
         }
 
         ResponseMsg<String> msg = JSON.parseObject(str, ResponseMsg.class);
-        if (msg == null || msg.getCode() != 200) {
+        if (msg == null || msg.getCode() != StaticData.TWO_HUNDRED) {
             return null;
         }
 
@@ -72,7 +73,7 @@
      * 鑾峰彇Map鏁版嵁
      */
     private Map<String, Object> getMapData(ExportEntity entity) {
-        Map<String, Object> map = new HashMap<String, Object>();
+        Map<String, Object> map = new HashMap<String, Object>(3);
 
         Field[] fields = entity.getClass().getDeclaredFields();
         for (Field field : fields) {
@@ -111,4 +112,14 @@
 
         return de;
     }
+
+    /**
+     * 鑾峰彇涓嬭浇鏂囦欢璺緞
+     *
+     * @param de 涓嬭浇瀹炰綋绫�
+     * @return 涓嬭浇鏂囦欢璺緞
+     */
+    public String getDownloadFilePath(DownloadEntity de) {
+        return pathHelper.getConfig().getDownloadPath() + File.separator + de.getUrl();
+    }
 }

--
Gitblit v1.9.3