管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-30 e5d341086b634f9ac0345b576e6497f978a53941
src/main/java/com/lf/server/controller/data/MetaController.java
@@ -22,6 +22,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.List;
/**
@@ -40,6 +42,8 @@
    @Autowired
    DownloadService downloadService;
    private final static String EQ = "=";
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
@@ -275,7 +279,10 @@
            if (null == reqEntity.getIds() || reqEntity.getIds().isEmpty()) {
                return fail("请选择要下载的文件");
            }
            if (!downloadService.validatePwd(reqEntity)) {
            if (!downloadService.decryptPwd(reqEntity)) {
                return fail("密码解密失败", null);
            }
            if (!StringHelper.checkPwdValid(reqEntity.getPwd())) {
                return fail("密码不符合要求");
            }
@@ -305,6 +312,10 @@
            if (StringHelper.isEmpty(guid) || StringHelper.isEmpty(pwd)) {
                return fail("文件ID和密码不能为空", null);
            }
            if (!pwd.endsWith(EQ)) {
                pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name());
            }
            String password = downloadService.decryptPwd(pwd);
            if (null == password) {
                return fail("密码解密失败", null);
@@ -340,6 +351,10 @@
            if (StringHelper.isEmpty(guid) || StringHelper.isEmpty(pwd)) {
                WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "文件ID和密码不能为空", res);
            }
            if (!pwd.endsWith(EQ)) {
                pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name());
            }
            String password = downloadService.decryptPwd(pwd);
            if (null == password) {
                WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "密码解密失败", res);