fix上次提交的bugs

This commit is contained in:
chen-xin-zhi 2025-06-03 19:46:13 +08:00
parent a859e28480
commit 3f926a3023
2 changed files with 1 additions and 3 deletions

View File

@ -96,7 +96,6 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo>
fileInfo = FileInfo.builder()
.name(fileName)
.type(fileType)
.path(fileName)
.size(fileSize)
.fileView(view)
.biz(biz)
@ -135,7 +134,7 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo>
FileInfo fileInfo = this.getOne(lambdaQueryWrapper);
ThrowUtils.throwIf(fileInfo == null, ErrorCode.NOT_FOUND_ERROR, "文件不存在");
File file = new File(UPLOAD_DIR + fileInfo.getPath());
File file = new File(UPLOAD_DIR + fileInfo.getName());
// // 设置response的Header
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileInfo.getName(), StandardCharsets.UTF_8));

View File

@ -175,7 +175,6 @@ public class WechatGetQrcodeServiceImpl implements WechatGetQrcodeService {
FileInfo fileInfo = FileInfo.builder()
.name(fileName)
.type(fileType)
.path(filePath)
.size(fileSize)
.fileView(view)
.biz(biz)