From afb74b6bb1dbb3ea0c0f4eb206d803f30c60ffc2 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 30 十二月 2022 16:15:17 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/data/MetaController.java | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 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..bd79283 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; @@ -308,7 +312,7 @@ } @SysLog() - @ApiOperation(value = "鍒嗛〉鏌ヨ涓嬭浇璁板綍骞惰繑鍥炶褰曟暟") + @ApiOperation(value = "鍒嗛〉鏌ヨ涓嬭浇鏂囦欢") @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = ""), @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"), @@ -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