统计不生效问题解决

This commit is contained in:
nojava
2026-05-23 04:21:18 +08:00
parent 284ecf4be8
commit 9a43c611b9
10 changed files with 221 additions and 9 deletions
@@ -41,8 +41,12 @@ public class UserServiceImpl implements UserService {
.type(user.getType())
.status(user.getStatus())
.articleCount(0)
.followerCount(0)
.followingCount(0)
.followerCount(Math.toIntExact(userFollowMapper.selectCount(
new LambdaQueryWrapper<UserFollow>()
.eq(UserFollow::getFolloweeId, userId))))
.followingCount(Math.toIntExact(userFollowMapper.selectCount(
new LambdaQueryWrapper<UserFollow>()
.eq(UserFollow::getFollowerId, userId))))
.build();
}