From 43863b3aa96e223fa3835245ad0d2c932bf63559 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 23 十二月 2022 16:21:52 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/show/ExportController.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/show/ExportController.java b/src/main/java/com/lf/server/controller/show/ExportController.java
index 46fec9c..b74915e 100644
--- a/src/main/java/com/lf/server/controller/show/ExportController.java
+++ b/src/main/java/com/lf/server/controller/show/ExportController.java
@@ -11,6 +11,7 @@
 import com.lf.server.helper.WebHelper;
 import com.lf.server.service.data.DownloadService;
 import com.lf.server.service.show.ExportService;
+import com.lf.server.service.sys.DownlogService;
 import com.lf.server.service.sys.TokenService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -36,6 +37,9 @@
 
     @Autowired
     ExportService exportService;
+
+    @Autowired
+    DownlogService downlogService;
 
     @Autowired
     DownloadService downloadService;
@@ -117,16 +121,14 @@
                 return;
             }
 
-            UserEntity ue = tokenService.getCurrentUser(req);
             DownloadEntity de = downloadService.selectByGuid(guid);
             if (null == de) {
                 WebHelper.writeInfo(HttpStatus.NOT_FOUND, "鏂囦欢涓嶅瓨鍦�", res);
                 return;
             }
 
-            de.setDcount(de.getDcount() + 1);
-            de.setDownloadUser(ue.getId());
-            int rows = downloadService.update(de);
+            UserEntity ue = tokenService.getCurrentUser(req);
+            downlogService.updateInfos(ue, de, req);
 
             String filePath = downloadService.getDownloadFilePath(de);
             WebHelper.download(filePath, de.getName(), res);

--
Gitblit v1.9.3