From c509bd8047cfd582c59bba66d148b236e45d038d Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 12 一月 2023 10:15:15 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/show/DataLibController.java |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 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..e8075cd 100644
--- a/src/main/java/com/lf/server/controller/show/DataLibController.java
+++ b/src/main/java/com/lf/server/controller/show/DataLibController.java
@@ -10,10 +10,8 @@
 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;
 import com.lf.server.entity.sys.UserEntity;
 import com.lf.server.helper.*;
 import com.lf.server.mapper.all.BasicMapper;
@@ -21,6 +19,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 +51,9 @@
 
     @Autowired
     DataLibService dataLibService;
+
+    @Autowired
+    DownlogService downlogService;
 
     @Autowired
     DownloadService downloadService;
@@ -146,14 +148,14 @@
             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())) {
+            if (StringHelper.isPwdInvalid(reqEntity.getPwd())) {
                 return fail("瀵嗙爜涓嶇鍚堣姹�");
             }
 
-            List<MetaFileEntity> list = metaService.selectMetaFiles(reqEntity.getIds());
+            List<MetaEntity> list = metaService.selectMetaFiles(reqEntity.getIds());
             if (null == list || list.isEmpty()) {
                 return fail("娌℃湁鎵惧埌鍏冩暟鎹�");
             }
@@ -183,7 +185,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 +224,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 +239,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