精简util模块,ReturenResponse重构

This commit is contained in:
chenkailing
2020-12-27 14:06:06 +08:00
committed by kl
parent 594bd895ec
commit 1f1970232b
24 changed files with 251 additions and 262 deletions

View File

@ -36,7 +36,7 @@ public class PictureFilePreviewImpl implements FilePreview {
// 不是http开头浏览器不能直接访问需下载到本地
if (url != null && !url.toLowerCase().startsWith("http")) {
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, null);
if (0 != response.getCode()) {
if (response.isFailure()) {
model.addAttribute("fileType", fileAttribute.getSuffix());
model.addAttribute("msg", response.getMsg());
return "fileNotSupported";