release: 修改已邀请人数的计算

release-2024-04-25
huangyw 2 months ago
parent b27d2e323c
commit 5ac5dde8a9

@ -395,11 +395,13 @@ public class UserPointLogService {
taskPointIds.add(TaskPointIdConstants.INVITE_USER_10);
taskPointIds.add(TaskPointIdConstants.INVITE_USER_20);
// 已获取的积分列表
List<UserPointLog> userPointLogByTaskPointIdInAndUserId = userPointLogDao.findUserPointLogByTaskPointIdInAndUserId(
taskPointIds, userId);
// 已邀请的人数
List<UserPointLog> alreadyInviteList = userPointLogDao.findUserPointLogByUserIdAndTaskPointId(userId, TaskPointIdConstants.NEW_USER_INVITE);
UserInvitationLogVO userInvitationLogVO = new UserInvitationLogVO();
userInvitationLogVO.setNum(userPointLogByTaskPointIdInAndUserId.isEmpty() ? 0
: userPointLogByTaskPointIdInAndUserId.size());
userInvitationLogVO.setNum(alreadyInviteList.isEmpty() ? 0 : alreadyInviteList.size());
userInvitationLogVO.setPoint(userPointLogByTaskPointIdInAndUserId.isEmpty() ? 0 :
userPointLogByTaskPointIdInAndUserId.stream().map(UserPointLog::getScore)
.reduce(0, Integer::sum)

Loading…
Cancel
Save