mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 16:57:12 +08:00
chore: 查询文件列表增加存储名称信息返回
This commit is contained in:
@@ -76,14 +76,20 @@ public class FileResp extends BaseDetailResp {
|
||||
private Long thumbnailSize;
|
||||
|
||||
/**
|
||||
* 缩略图URL
|
||||
* 缩略图 URL
|
||||
*/
|
||||
@Schema(description = "缩略图URL", example = "https://examplebucket.oss-cn-hangzhou.aliyuncs.com/example/example.jpg.min.jpg")
|
||||
@Schema(description = "缩略图 URL", example = "https://examplebucket.oss-cn-hangzhou.aliyuncs.com/example/example.jpg.min.jpg")
|
||||
private String thumbnailUrl;
|
||||
|
||||
/**
|
||||
* 存储 ID
|
||||
*/
|
||||
@Schema(description = "存储ID", example = "1")
|
||||
@Schema(description = "存储 ID", example = "1")
|
||||
private Long storageId;
|
||||
|
||||
/**
|
||||
* 存储名称
|
||||
*/
|
||||
@Schema(description = "存储名称", example = "MinIO")
|
||||
private String storageName;
|
||||
}
|
@@ -154,6 +154,7 @@ public class FileServiceImpl extends BaseServiceImpl<FileMapper, FileDO, FileRes
|
||||
String thumbnailUrl = StrUtils.blankToDefault(fileResp.getThumbnailUrl(), url, thUrl -> URLUtil
|
||||
.normalize(prefix + thUrl));
|
||||
fileResp.setThumbnailUrl(thumbnailUrl);
|
||||
fileResp.setStorageName("%s (%s)".formatted(storage.getName(), storage.getCode()));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user