From 1d53dd8f501a98ddcce8146443b51b357ef5f9b1 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 29 十二月 2022 16:55:46 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/show/DataLibController.java |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/show/DataLibController.java b/src/main/java/com/lf/server/controller/show/DataLibController.java
index 5146b2f..ac1ca88 100644
--- a/src/main/java/com/lf/server/controller/show/DataLibController.java
+++ b/src/main/java/com/lf/server/controller/show/DataLibController.java
@@ -10,7 +10,6 @@
 import com.lf.server.entity.all.ResponseMsg;
 import com.lf.server.entity.all.StaticData;
 import com.lf.server.entity.ctrl.DownloadReqEntity;
-import com.lf.server.entity.data.DictEntity;
 import com.lf.server.entity.data.DownloadEntity;
 import com.lf.server.entity.data.MetaEntity;
 import com.lf.server.entity.data.MetaFileEntity;
@@ -21,6 +20,7 @@
 import com.lf.server.service.data.DownloadService;
 import com.lf.server.service.data.MetaService;
 import com.lf.server.service.show.DataLibService;
+import com.lf.server.service.sys.DownlogService;
 import com.lf.server.service.sys.TokenService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -52,6 +52,9 @@
 
     @Autowired
     DataLibService dataLibService;
+
+    @Autowired
+    DownlogService downlogService;
 
     @Autowired
     DownloadService downloadService;
@@ -146,7 +149,7 @@
             if (null == reqEntity.getIds() || reqEntity.getIds().isEmpty()) {
                 return fail("璇烽�夋嫨瑕佷笅杞界殑鏂囦欢");
             }
-            if (!downloadService.decryptPwd(reqEntity)) {
+            if (!DownloadService.decryptPwd(reqEntity)) {
                 return fail("瀵嗙爜瑙e瘑澶辫触", null);
             }
             if (!StringHelper.checkPwdValid(reqEntity.getPwd())) {
@@ -183,7 +186,7 @@
                 pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name());
             }
 
-            String password = downloadService.decryptPwd(pwd);
+            String password = DownloadService.decryptPwd(pwd);
             if (null == password) {
                 return fail("瀵嗙爜瑙e瘑澶辫触", null);
             }
@@ -222,7 +225,7 @@
                 pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name());
             }
 
-            String password = downloadService.decryptPwd(pwd);
+            String password = DownloadService.decryptPwd(pwd);
             if (null == password) {
                 WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "瀵嗙爜瑙e瘑澶辫触", res);
             }
@@ -237,9 +240,7 @@
             }
 
             UserEntity ue = tokenService.getCurrentUser(req);
-            de.setDcount(de.getDcount() + 1);
-            de.setDownloadUser(ue.getId());
-            int rows = downloadService.update(de);
+            downlogService.updateInfos(ue, de, req);
 
             String filePath = downloadService.getDownloadFilePath(de);
             WebHelper.download(filePath, de.getName(), res);

--
Gitblit v1.9.3