update 资料中心
This commit is contained in:
+1
-1
@@ -143,7 +143,7 @@ public class LawsDataCenterFileController extends JeroController<LawsDataCenterF
|
|||||||
@AutoLog(value = "资料中心-文件数据-下载")
|
@AutoLog(value = "资料中心-文件数据-下载")
|
||||||
@ApiOperation(value = "资料中心-文件数据-下载", notes = "资料中心-文件数据-下载")
|
@ApiOperation(value = "资料中心-文件数据-下载", notes = "资料中心-文件数据-下载")
|
||||||
@GetMapping(value = "/download")
|
@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);
|
LawsDataCenterFile file = lawsDataCenterFileService.queryById(id);
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||||
|
|||||||
+3
@@ -107,6 +107,9 @@ public class LawsDataCenterFileServiceImpl extends ServiceImpl<LawsDataCenterFil
|
|||||||
BeanUtils.copyProperties(lawsDataCenterFile, file);
|
BeanUtils.copyProperties(lawsDataCenterFile, file);
|
||||||
file.setFileId(fileId);
|
file.setFileId(fileId);
|
||||||
OSSFile ossFile = ossFileService.getById(fileId);
|
OSSFile ossFile = ossFileService.getById(fileId);
|
||||||
|
if (ossFile == null) {
|
||||||
|
throw new JeroBootException("文件不存在");
|
||||||
|
}
|
||||||
file.setFileName(ossFile.getFileName());
|
file.setFileName(ossFile.getFileName());
|
||||||
fileList.add(file);
|
fileList.add(file);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user