fix 导出Excel加密后无法查看的问题

This commit is contained in:
lijiarao
2024-03-22 14:45:49 +08:00
parent 2994848bc8
commit d1ae0625c4
6 changed files with 22 additions and 14 deletions
@@ -26,7 +26,7 @@ public class SearchController {
@RequestParam("url") String url,
@RequestParam("appCode") String appCode,
@RequestParam("secretKey") String secretKey,
@RequestParam("scope") Integer scope,
@RequestParam(value = "scope",required = false) Integer scope,
HttpServletResponse response) {
try (InputStream inputStream = IntekeyUtils.DecryptFile(url, appCode, secretKey, scope, file);
OutputStream outputStream = response.getOutputStream()
@@ -133,7 +133,9 @@ public class DownloadDecryptFileServiceImpl implements DownloadDecryptFileServic
String contentType = response.getContentType();
String fileName = getFileName(response);
if (!fileName.contains(".")) {
return;
}
MultipartFile file = getMultipartFile(response,responseBody, contentType, fileName);
// 访问路径
String str = request.getRequestURI();