代码提交--标签相关
This commit is contained in:
@@ -36,14 +36,14 @@ public class DiscussionsServiceImpl implements IDiscussionsService {
|
||||
return discussionsRepository.getOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Discussion> queryAllDiscussionsList(Discussion discussion, int pageNum, int pageSize) {
|
||||
Sort sort=new Sort(Sort.Direction.DESC,"id");
|
||||
@Override
|
||||
public Page<Discussion> queryAllDiscussionsList(Discussion discussion, int pageNum, int pageSize) {
|
||||
Sort sort = new Sort(Sort.Direction.DESC, "id");
|
||||
@SuppressWarnings("deprecation")
|
||||
Pageable pageable=new PageRequest(pageNum,pageSize,sort);
|
||||
Pageable pageable = new PageRequest(pageNum, pageSize, sort);
|
||||
//将匹配对象封装成Example对象
|
||||
Example<Discussion> example = Example.of(discussion);
|
||||
|
||||
return discussionsRepository.findAll(example,pageable);
|
||||
return discussionsRepository.findAll(example, pageable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PostsServiceImpl implements IPostsService {
|
||||
|
||||
@Override
|
||||
public Post findOneByid(Integer id) {
|
||||
Post post =new Post();
|
||||
Post post = new Post();
|
||||
post.setId(id);
|
||||
Example<Post> example = Example.of(post);
|
||||
Optional<Post> postRes = postsRepository.findOne(example);
|
||||
@@ -66,7 +66,6 @@ public class PostsServiceImpl implements IPostsService {
|
||||
// List<PostCustom> thenpostCustomListNew = PostCommonUtil.getNewPostsObjCustom(thenpostCustomList);
|
||||
|
||||
|
||||
|
||||
//新建一个Node集合。
|
||||
ArrayList<Node> nodes = new ArrayList<>();
|
||||
//将第一层评论都添加都Node集合中
|
||||
@@ -82,8 +81,6 @@ public class PostsServiceImpl implements IPostsService {
|
||||
Node.show(list);
|
||||
|
||||
|
||||
|
||||
|
||||
// List<Map<String, Object>> posts = postsRepository.findPostCustomById(id);
|
||||
//
|
||||
// List<PostCustom> postCustomList = PostCommonUtil.getNewPostsObjMap(posts);
|
||||
|
||||
Reference in New Issue
Block a user