Commit 393baa72 by 段启岩

延时发布自己可见

parent 62959551
......@@ -315,7 +315,10 @@ public class PostServiceImpl extends ServiceImpl<PostMapper, Post> implements IP
queryWrapper.eq("status", 0);
}
queryWrapper.orderByDesc("create_time");
if (!SubjectUtils.isAuthenticated() || !SubjectUtils.getSubject().getId().equals(userId)) {
queryWrapper.le("create_time", new Date());
}
IPage<Post> postPage = new Page<>(pageNumber, pageSize);
return toPageDTO(page(postPage, queryWrapper));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment