1.邀请排行榜没有收益修复
This commit is contained in:
parent
3f8fd5b086
commit
d4183436e6
|
|
@ -124,16 +124,18 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
||||||
private final AliService aliService;
|
private final AliService aliService;
|
||||||
private final UserInfoService userInfoService;
|
private final UserInfoService userInfoService;
|
||||||
private final UserVipDao userVipDao;
|
private final UserVipDao userVipDao;
|
||||||
|
private final InviteAchievementService inviteAchievementService;
|
||||||
|
|
||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
private String profiles;
|
private String profiles;
|
||||||
|
|
||||||
private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock(true);
|
private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock(true);
|
||||||
|
|
||||||
public UserServiceImpl(@Lazy AliService aliService, UserInfoService userInfoService, UserVipDao userVipDao) {
|
public UserServiceImpl(@Lazy AliService aliService, UserInfoService userInfoService, UserVipDao userVipDao, InviteAchievementService inviteAchievementService) {
|
||||||
this.aliService = aliService;
|
this.aliService = aliService;
|
||||||
this.userInfoService = userInfoService;
|
this.userInfoService = userInfoService;
|
||||||
this.userVipDao = userVipDao;
|
this.userVipDao = userVipDao;
|
||||||
|
this.inviteAchievementService = inviteAchievementService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -1524,7 +1526,18 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
||||||
@Override
|
@Override
|
||||||
public Result selectInviteUserList(Integer page, Integer limit, String userName, String phone) {
|
public Result selectInviteUserList(Integer page, Integer limit, String userName, String phone) {
|
||||||
PageHelper.startPage(page,limit);
|
PageHelper.startPage(page,limit);
|
||||||
return Result.success().put("data", PageUtils.page(new PageInfo<>(baseMapper.selectInviteUserList(userName, phone)),true));
|
List<UserEntity> userEntities = baseMapper.selectInviteUserList(userName, phone);
|
||||||
|
if (!userEntities.isEmpty()) {
|
||||||
|
Set<Long> userIdList = userEntities.stream().map(UserEntity::getUserId).collect(Collectors.toSet());
|
||||||
|
Map<Long, UserMoney> infoMap = userMoneyService.list(new LambdaQueryWrapper<UserMoney>()
|
||||||
|
.in(UserMoney::getUserId, userIdList))
|
||||||
|
.stream().collect(Collectors.toMap(UserMoney::getUserId, item -> item));
|
||||||
|
userEntities.forEach(item -> {
|
||||||
|
UserMoney userMoney = infoMap.get(item.getUserId());
|
||||||
|
item.setMoney(userMoney == null ? BigDecimal.ZERO : userMoney.getInviteIncomeMoney());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return Result.success().put("data", PageUtils.page(new PageInfo<>(userEntities),true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue