增加下列代码以后,就可以看见以上的图片
/**
* 关注的帖子
* <img src="https://xxx.cn/f6ac09330c484637b1cf1d43aa1674aa_jlyuan1313.jpg!1">
* <button>ddd</button>
* <a rel="nofollow" href="https://mp.csdn.net/edit" target="_blank" >
* 请参见
* </a>
* @param page
* @return
*/
@Override
public Page<PlazaPostsNearVO> follow(Page<PlazaPostsNearVO> page) {
Long currentUserId = redisUtils.getCurrentUserId();
//自己关注过的用户id
List<Long> followUserId = getFollowPostsId(currentUserId);
if (CollectionUtil.isEmpty(followUserId)) {
return page;
}
Page<PlazaPostsNearVO> datas = plazaPostsMapper.follow(followUserId, currentUserId == null ? -1 : currentUserId, page);
//帖子的附件查询
buildAttachment(datas);
return datas;
}
编辑树形结构逻辑链:如下图所示