优化:重构大量代码,修复异常

This commit is contained in:
陈精华
2020-05-15 18:09:19 +08:00
committed by kl
parent 8a52450629
commit 180e7bcb8a
35 changed files with 464 additions and 699 deletions

View File

@ -1,6 +1,5 @@
package cn.keking.service.impl;
import cn.keking.config.ConfigConstants;
import cn.keking.model.FileAttribute;
import cn.keking.model.ReturnResponse;
import cn.keking.service.FilePreview;
@ -30,7 +29,7 @@ public class PictureFilePreviewImpl implements FilePreview {
@Override
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
String fileKey = (String) RequestContextHolder.currentRequestAttributes().getAttribute("fileKey",0);
List imgUrls = Lists.newArrayList(url);
List<String> imgUrls = Lists.newArrayList(url);
try {
imgUrls.clear();
imgUrls.addAll(fileUtils.getImgCache(fileKey));