master:管理员账号,推广列表查询报错解决;

pull/1121/head
liujiang 2025-11-13 22:33:06 +08:00
parent c045b1f8ea
commit 45a7cb2e1f
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ public class AdvertServiceImpl implements IAdvertService {
return Page.empty(pageDTO.getPageSize(), pageDTO.getPageNum());
}
List<Long> fileIdList = advertList.stream().map(Advert::getExamplePicId).filter(ObjectUtils::isNotEmpty).collect(Collectors.toList());
Map<Long, SysFile> fileMap = this.fileMapper.selectByIds(fileIdList).stream().collect(Collectors.toMap(SysFile::getId, Function.identity()));
Map<Long, SysFile> fileMap = CollectionUtils.isEmpty(fileIdList) ? new HashMap<>()
: this.fileMapper.selectByIds(fileIdList).stream().collect(Collectors.toMap(SysFile::getId, Function.identity()));
List<AdvertResDTO> advertResDTOList = advertList.stream().map(x -> {
AdvertResDTO advertResDTO = BeanUtil.toBean(x, AdvertResDTO.class);
if (ObjectUtils.isNotEmpty(x.getExamplePicId())) {