|
|
@@ -100,7 +100,7 @@ public class UserServiceImpl implements IUserService {
|
|
|
if(ObjectUtil.isNull(userVo)) {
|
|
|
return null;
|
|
|
}
|
|
|
- return convertVo(userVo, false);
|
|
|
+ return convertVo(userVo, null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -119,27 +119,28 @@ public class UserServiceImpl implements IUserService {
|
|
|
}
|
|
|
LambdaQueryWrapper<User> lqw = buildQueryWrapper(bo);
|
|
|
Page<UserVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
- result.setRecords(convertList(result.getRecords(), false));
|
|
|
+ result.setRecords(convertList(result.getRecords(), null));
|
|
|
return TableDataInfo.build(result);
|
|
|
}
|
|
|
|
|
|
- private List<UserVo> convertList(List<UserVo> list, boolean isBusiness) {
|
|
|
+ private List<UserVo> convertList(List<UserVo> list, Long businessId) {
|
|
|
if(ObjectUtil.isEmpty(list)) {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
- return list.stream().map(item -> convertVo(item, isBusiness)).collect(Collectors.toList());
|
|
|
+ return list.stream().map(item -> convertVo(item, businessId)).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
- private UserVo convertVo(UserVo userVo, boolean isBusiness) {
|
|
|
+ private UserVo convertVo(UserVo userVo, Long businessId) {
|
|
|
UserBo userBo = new UserBo();
|
|
|
userBo.setId(userVo.getId());
|
|
|
+ userBo.setBusinessId(businessId);
|
|
|
userVo.setSurplusQueueMoney(baseMapper.querySurplusQueueMoney(userBo));
|
|
|
UserStatisticsVo userStatisticsVo = baseMapper.querySubsidyMoney(userBo);
|
|
|
if (ObjectUtil.isNotNull(userStatisticsVo)) {
|
|
|
userVo.setShouldSubsidyMoney(userStatisticsVo.getShouldSubsidyMoney());
|
|
|
userVo.setAlreadySubsidyMoney(userStatisticsVo.getAlreadySubsidyMoney());
|
|
|
}
|
|
|
- if (!isBusiness) {
|
|
|
+ if (ObjectUtil.isNull(businessId)) {
|
|
|
UserStatisticsVo statistics = baseMapper.statistics(userBo);
|
|
|
if (ObjectUtil.isNotNull(statistics)) {
|
|
|
userVo.setAvailablePoint(statistics.getAvailablePoint());
|
|
|
@@ -830,7 +831,7 @@ public class UserServiceImpl implements IUserService {
|
|
|
bo.setCreateDayEnd(DateUtil.endOfDay(bo.getCreateDayEnd()));
|
|
|
}
|
|
|
Page<UserVo> result = baseMapper.selectBusinessPage(pageQuery.build(), bo);
|
|
|
- result.setRecords(convertList(result.getRecords(), true));
|
|
|
+ result.setRecords(convertList(result.getRecords(), bo.getBusinessId()));
|
|
|
return TableDataInfo.build(result);
|
|
|
}
|
|
|
|