获取url接口支持图片处理样式

This commit is contained in:
tianliyong 2022-12-13 18:32:08 +08:00
parent 7b1fd43699
commit 8d35c83167

View File

@ -266,13 +266,14 @@ public class FileServiceImpl implements FileService {
if (CollectionUtil.isNotEmpty(fileList)) {
fileList.stream().forEach(file -> {
FindFileUrlResponse response = new FindFileUrlResponse();
response.setUrl(file.getFileUrl());
String fileUrl = file.getFileUrl();
String fileKey = file.getFileUuid();
if (fileKeyStyleMap.containsKey(fileKey)) {
response.setFileKey(fileKeyStyleMap.get(fileKey));
} else {
response.setFileKey(fileKey);
fileKey = fileKeyStyleMap.get(fileKey);
fileUrl += fileKey.substring(fileKey.indexOf("?"));
}
response.setFileKey(fileKey);
response.setUrl(fileUrl);
resList.add(response);
});
}