mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-09 20:57:21 +08:00
chore: 优化部分代码
This commit is contained in:
@@ -146,7 +146,7 @@ public class FileServiceImpl extends BaseServiceImpl<FileMapper, FileDO, FileRes
|
||||
super.fill(obj);
|
||||
if (obj instanceof FileResp fileResp && !URLUtils.isHttpUrl(fileResp.getUrl())) {
|
||||
StorageDO storage = storageService.getById(fileResp.getStorageId());
|
||||
String prefix = storage.getDomain() + StringConstants.SLASH;
|
||||
String prefix = StrUtil.appendIfMissing(storage.getDomain(), StringConstants.SLASH);
|
||||
String url = URLUtil.normalize(prefix + fileResp.getUrl());
|
||||
fileResp.setUrl(url);
|
||||
String thumbnailUrl = StrUtils.blankToDefault(fileResp.getThumbnailUrl(), url, thUrl -> URLUtil
|
||||
|
Reference in New Issue
Block a user