mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-07 01:01:37 +08:00
chore: 查询文件列表增加存储名称信息返回
This commit is contained in:
@@ -86,4 +86,10 @@ public class FileResp extends BaseDetailResp {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "存储 ID", example = "1")
|
@Schema(description = "存储 ID", example = "1")
|
||||||
private Long storageId;
|
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
|
String thumbnailUrl = StrUtils.blankToDefault(fileResp.getThumbnailUrl(), url, thUrl -> URLUtil
|
||||||
.normalize(prefix + thUrl));
|
.normalize(prefix + thUrl));
|
||||||
fileResp.setThumbnailUrl(thumbnailUrl);
|
fileResp.setThumbnailUrl(thumbnailUrl);
|
||||||
|
fileResp.setStorageName("%s (%s)".formatted(storage.getName(), storage.getCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user