|
|
@@ -191,9 +191,8 @@ public class CommunicationServiceImpl implements CommunicationService {
|
|
|
public PageVO<CommunicationVO> getStarredCommunicationPage(Long userId, Integer page, Integer size) {
|
|
|
Pageable pageable = PageRequest.of(page,size);
|
|
|
Page<CommunicationStar> communicationStars=communicationStarRepository.findByUserId(userId,pageable);
|
|
|
- Page<Communication> communications=new PageImpl<>(communicationStars.getContent().stream().map(
|
|
|
- communicationStar -> communicationRepository.findById(communicationStar.getCommunicationId()).get()
|
|
|
- ).collect(Collectors.toList()),pageable,communicationStars.getTotalElements());
|
|
|
+ Page<Communication> communications=communicationStars.map(
|
|
|
+ communicationStar -> communicationRepository.findById(communicationStar.getCommunicationId()).get());
|
|
|
return toPageVO(communications,userId);
|
|
|
}
|
|
|
|