|
|
@@ -57,8 +57,9 @@ public class UserCommentServiceImpl extends ServiceImpl<UserCommentMapper, UserC
|
|
|
|
|
|
@Override
|
|
|
public Page<UserCommentVo> page(UserCommentPageParam userCommentPageParam) {
|
|
|
- Page<UserCommentVo> page=userCommentMapper.selectCommentPid(CommonPageRequest.defaultPage(),userCommentPageParam.getResourceId());
|
|
|
- List<UserCommentVo> list=userCommentMapper.selectCommentNoPid(userCommentPageParam.getResourceId());
|
|
|
+
|
|
|
+ Page<UserCommentVo> page=userCommentMapper.selectCommentPid(CommonPageRequest.defaultPage(),userCommentPageParam.getResourceId(),StpLoginUserUtil.getLoginUser().getId());
|
|
|
+ List<UserCommentVo> list=userCommentMapper.selectCommentNoPid(userCommentPageParam.getResourceId(),StpLoginUserUtil.getLoginUser().getId());
|
|
|
page.getRecords().stream().forEach(item -> {
|
|
|
List<UserCommentVo> child= list.stream().filter(itemchild-> itemchild.getPid().equals(item.getId())).collect(Collectors.toList());
|
|
|
item.setChild(child);
|
|
|
@@ -70,7 +71,7 @@ public class UserCommentServiceImpl extends ServiceImpl<UserCommentMapper, UserC
|
|
|
@Override
|
|
|
public List<UserCommentVo> queryList(String resourceId)
|
|
|
{
|
|
|
- List<UserCommentVo> list=userCommentMapper.selectCommentNoPid(resourceId);
|
|
|
+ List<UserCommentVo> list=userCommentMapper.queryListCount(resourceId);
|
|
|
return list;
|
|
|
}
|
|
|
|