|
|
@@ -10,6 +10,8 @@ import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
@@ -133,8 +135,12 @@ public class FileInfoServiceImpl implements FileInfoService {
|
|
|
}
|
|
|
|
|
|
public String getImageUrl(String imageId, Map<Integer, FileInfoEntity> map) {
|
|
|
- FileInfoEntity info = map.get(Integer.parseInt(imageId));
|
|
|
- String imageUrl = FileUploadUtil.getFileUrl(info.getPath());
|
|
|
+ String imageUrl = "";
|
|
|
+ if (StringUtils.isNoneBlank(imageId)) {
|
|
|
+ FileInfoEntity info = map.get(Integer.parseInt(imageId));
|
|
|
+ imageUrl = FileUploadUtil.getFileUrl(info.getPath());
|
|
|
+ }
|
|
|
+
|
|
|
return imageUrl;
|
|
|
}
|
|
|
|