|
@@ -379,8 +379,35 @@ public class AlbumYelpServiceImpl extends SuperServiceImpl<AlbumYelpMapper, Albu
|
|
|
Map<String, Object> params = queryFilter.getParams();
|
|
|
String albumId = (String) params.get("albumId");
|
|
|
String type = (String) params.get("type");
|
|
|
+ String yelpId = (String) params.get("yelpId");
|
|
|
+ List<AlbumYelp> listAllReplies;
|
|
|
+ if ("1".equals(type)){
|
|
|
+ //全部回复
|
|
|
+ listAllReplies = albumYelpMapper.findListAllReplies(albumId, userId, yelpId);
|
|
|
+ } else {
|
|
|
+ //与我相关的回复(带点评Id)
|
|
|
+ listAllReplies = albumYelpMapper.findListAllRepliesByYelpId(albumId, userId, yelpId);
|
|
|
+
|
|
|
+ }
|
|
|
+ return getPage(queryFilter, listAllReplies);
|
|
|
+ }
|
|
|
|
|
|
- return null;
|
|
|
+ /**
|
|
|
+ * PC查询回复信息封装
|
|
|
+ * @param queryFilter
|
|
|
+ * @param listAllReplies
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private IPage getPage(QueryFilter queryFilter, List<AlbumYelp> listAllReplies) {
|
|
|
+ List<AlbumYelpListPcVo> albumYelpListPcVos = listAllReplies.parallelStream().map(e -> {
|
|
|
+ AlbumYelpListPcVo albumYelpListPcVo = new AlbumYelpListPcVo();
|
|
|
+ BeanUtils.copyProperties(e, albumYelpListPcVo);
|
|
|
+ albumYelpListPcVo.setCreateName(userService.queryOsUserDto(e.getCreateBy()).getFullName());
|
|
|
+ albumYelpListPcVo.setCreatePhoto((String) userService.querySexAndPhoto(e.getCreateBy()).get("photo"));
|
|
|
+ return albumYelpListPcVo;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ Page pages = PageListUtils.getPages(queryFilter.getPage().getCurrent(), queryFilter.getPage().getSize(), albumYelpListPcVos);
|
|
|
+ return pages;
|
|
|
}
|
|
|
|
|
|
/**
|