|
|
@ -78,15 +78,15 @@ public class CommunityServiceImpl implements CommunityService { |
|
|
|
//审核状态为已经通过 |
|
|
|
query.eq(CommunityPost::getStatus, "1"); |
|
|
|
|
|
|
|
//用户审核没有通过的帖子也能被用户自己查看 |
|
|
|
if(null != hanHaiMember){ |
|
|
|
String userId = hanHaiMember.getId(); |
|
|
|
query.or( |
|
|
|
q -> q |
|
|
|
.eq(CommunityPost::getUserId, userId) |
|
|
|
.eq(CommunityPost::getType, communityPost.getType()) |
|
|
|
); |
|
|
|
} |
|
|
|
// //用户审核没有通过的帖子也能被用户自己查看 |
|
|
|
// if(null != hanHaiMember){ |
|
|
|
// String userId = hanHaiMember.getId(); |
|
|
|
// query.or( |
|
|
|
// q -> q |
|
|
|
// .eq(CommunityPost::getUserId, userId) |
|
|
|
// .eq(CommunityPost::getType, communityPost.getType()) |
|
|
|
// ); |
|
|
|
// } |
|
|
|
|
|
|
|
//按照创建时间降序排列 |
|
|
|
query.orderByDesc(CommunityPost::getCreateTime); |
|
|
|