update PostServiceImpl.java
This commit is contained in:
parent
0ffbd411dc
commit
86ab8f6131
@ -176,7 +176,6 @@ public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
AppUserEntity user = localUser.getUser();
|
AppUserEntity user = localUser.getUser();
|
||||||
|
|
||||||
post.setReadCount(post.getReadCount()+1);
|
post.setReadCount(post.getReadCount()+1);
|
||||||
baseMapper.updateById(post);
|
baseMapper.updateById(post);
|
||||||
PostDetailResponse response=new PostDetailResponse();
|
PostDetailResponse response=new PostDetailResponse();
|
||||||
@ -184,7 +183,6 @@ public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements
|
|||||||
AppUserEntity userInfo = appUserService.getById(post.getUid());
|
AppUserEntity userInfo = appUserService.getById(post.getUid());
|
||||||
|
|
||||||
response.setUserInfo(userInfo);
|
response.setUserInfo(userInfo);
|
||||||
|
|
||||||
if(ObjectUtil.isNull(user)){
|
if(ObjectUtil.isNull(user)){
|
||||||
response.setIsFollow(false);
|
response.setIsFollow(false);
|
||||||
response.setIsCollection(false);
|
response.setIsCollection(false);
|
||||||
@ -246,9 +244,6 @@ public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements
|
|||||||
appPage = this.mapPostList(page, queryWrapper, 0);
|
appPage = this.mapPostList(page, queryWrapper, 0);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if (ObjectUtil.isNotNull(request.getTopicId())) {
|
|
||||||
queryWrapper.lambda().eq(PostEntity::getTopicId, request.getTopicId());
|
|
||||||
}
|
|
||||||
if (ObjectUtil.isNotNull(request.getOrder())) {
|
if (ObjectUtil.isNotNull(request.getOrder())) {
|
||||||
if (request.getOrder().equals(Constant.ORDER_DESC_READCOUNT)) {
|
if (request.getOrder().equals(Constant.ORDER_DESC_READCOUNT)) {
|
||||||
queryWrapper.lambda().orderByDesc(PostEntity::getReadCount);
|
queryWrapper.lambda().orderByDesc(PostEntity::getReadCount);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user