|
@@ -68,6 +68,20 @@ public class UserCommentServiceImpl extends ServiceImpl<UserCommentMapper, UserC
|
|
|
return page;
|
|
return page;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Page<UserCommentVo> pageList(UserCommentPageParam userCommentPageParam) {
|
|
|
|
|
+ Page<UserCommentVo> page=userCommentMapper.pageList(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);
|
|
|
|
|
+ item.setChildSize(child.size());
|
|
|
|
|
+ });
|
|
|
|
|
+ return page;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<UserCommentVo> queryList(String resourceId)
|
|
public List<UserCommentVo> queryList(String resourceId)
|
|
|
{
|
|
{
|
|
@@ -139,6 +153,8 @@ public class UserCommentServiceImpl extends ServiceImpl<UserCommentMapper, UserC
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public UserComment queryEntity(Integer id) {
|
|
public UserComment queryEntity(Integer id) {
|
|
|
UserComment userComment = this.getById(id);
|
|
UserComment userComment = this.getById(id);
|
|
|
if(ObjectUtil.isEmpty(userComment)) {
|
|
if(ObjectUtil.isEmpty(userComment)) {
|