mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-04-21 17:17:16 +00:00
refactor file mapping flow in image and video services
This commit is contained in:
parent
fb86173a70
commit
1b0ca54054
2 changed files with 3 additions and 3 deletions
|
|
@ -96,8 +96,8 @@ public class ImageService extends BaseService<ImageEntity, ImagePageDto> {
|
|||
.filter(ObjectUtils::isNotEmpty)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
if (ObjectUtils.isEmpty(fileIds)) {
|
||||
Map<String, FileEntity> fileMap = fileService.findById(fileIds, false)
|
||||
if (ObjectUtils.isNotEmpty(fileIds)) {
|
||||
Map<String, FileEntity> fileMap = fileService.findById(fileIds, true)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(FileEntity::getId, Function.identity()));
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class VideoService extends BaseService<VideoEntity, VideoPageDto> {
|
|||
.collect(Collectors.toSet());
|
||||
|
||||
if (ObjectUtils.isNotEmpty(fileIds)) {
|
||||
Map<String, FileEntity> fileMap = fileService.findById(fileIds, false)
|
||||
Map<String, FileEntity> fileMap = fileService.findById(fileIds, true)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(FileEntity::getId, Function.identity()));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue