update 资料中心

This commit is contained in:
liao
2023-10-31 15:30:28 +08:00
parent 89525e6523
commit c7dc21b123
2 changed files with 4 additions and 1 deletions
@@ -143,7 +143,7 @@ public class LawsDataCenterFileController extends JeroController<LawsDataCenterF
@AutoLog(value = "资料中心-文件数据-下载")
@ApiOperation(value = "资料中心-文件数据-下载", notes = "资料中心-文件数据-下载")
@GetMapping(value = "/download")
public void download(@RequestParam(name = "id") String id,HttpServletRequest request, HttpServletResponse response) {
public void download(@RequestParam(name = "id") String id, HttpServletRequest request, HttpServletResponse response) {
LawsDataCenterFile file = lawsDataCenterFileService.queryById(id);
if (file == null) {
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
@@ -107,6 +107,9 @@ public class LawsDataCenterFileServiceImpl extends ServiceImpl<LawsDataCenterFil
BeanUtils.copyProperties(lawsDataCenterFile, file);
file.setFileId(fileId);
OSSFile ossFile = ossFileService.getById(fileId);
if (ossFile == null) {
throw new JeroBootException("文件不存在");
}
file.setFileName(ossFile.getFileName());
fileList.add(file);
});