|
|
@@ -97,4 +97,25 @@ public class ImageRepository {
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ @Deprecated
|
|
|
+ public ImageUrlDto getImageUrl1(String imageFileId) {
|
|
|
+ List<ImageFile> list = imageFileMapper.findByImageFileId(imageFileId);
|
|
|
+ if (list.isEmpty()) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ ImageUrlDto imageUrlDto = new ImageUrlDto(imageFileId);
|
|
|
+ for (ImageFile imageFile : list) {
|
|
|
+ String format = imageFile.getFormat();
|
|
|
+ String url = imageFile.getUrl();
|
|
|
+ if ("webp".equals(format)) {
|
|
|
+ imageUrlDto.setThumbnailUrl(url);
|
|
|
+ } else {
|
|
|
+ imageUrlDto.setOriginalUrl(url);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return imageUrlDto;
|
|
|
+ }
|
|
|
}
|