From 2be836a7aeae8c1ff6dad41e227f58f16bf94b5e Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期日, 25 十二月 2022 21:00:31 +0800 Subject: [PATCH] 13 --- src/main/java/com/lf/server/controller/data/MetaController.java | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/lf/server/controller/data/MetaController.java b/src/main/java/com/lf/server/controller/data/MetaController.java index 793b1f4..f703d99 100644 --- a/src/main/java/com/lf/server/controller/data/MetaController.java +++ b/src/main/java/com/lf/server/controller/data/MetaController.java @@ -23,6 +23,7 @@ import com.lf.server.service.all.BaseQueryService; import com.lf.server.service.data.DownloadService; import com.lf.server.service.data.MetaService; +import com.lf.server.service.sys.DownlogService; import com.lf.server.service.sys.TokenService; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; @@ -51,6 +52,9 @@ @Autowired BaseQueryService baseQueryService; + + @Autowired + DownlogService downlogService; @Autowired DownloadService downloadService; @@ -354,7 +358,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())) { @@ -391,7 +395,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); } @@ -430,7 +434,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); } @@ -445,9 +449,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