| | |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().in(User::getAgentId, ids)); |
| | | userIds = users.stream().map(User::getId).collect(Collectors.toList()); |
| | | } |
| | | //今日充值 |
| | | List<UserRecharge> todayRecharges = userRechargeMapper.selectList(new LambdaQueryWrapper<UserRecharge>().eq(UserRecharge::getOrderStatus, 1) |
| | | .ge(UserRecharge::getPayTime, start) |
| | | .le(UserRecharge::getPayTime, end) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserRecharge::getUserId,userIds)); |
| | | if((StringUtils.isNotEmpty(agentId) && CollectionUtil.isNotEmpty(userIds)) || StringUtils.isEmpty(agentId)){ |
| | | //今日充值 |
| | | List<UserRecharge> todayRecharges = userRechargeMapper.selectList(new LambdaQueryWrapper<UserRecharge>().eq(UserRecharge::getOrderStatus, 1) |
| | | .ge(UserRecharge::getPayTime, start) |
| | | .le(UserRecharge::getPayTime, end) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserRecharge::getUserId,userIds)); |
| | | |
| | | //今日提现 |
| | | List<UserWithdraw> todayWithdraws = userWithdrawMapper.selectList(new LambdaQueryWrapper<UserWithdraw>().eq(UserWithdraw::getWithStatus, 1) |
| | | .ge(UserWithdraw::getTransTime, start) |
| | | .le(UserWithdraw::getTransTime, end) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserWithdraw::getUserId,userIds)); |
| | | //今日提现 |
| | | List<UserWithdraw> todayWithdraws = userWithdrawMapper.selectList(new LambdaQueryWrapper<UserWithdraw>().eq(UserWithdraw::getWithStatus, 1) |
| | | .ge(UserWithdraw::getTransTime, start) |
| | | .le(UserWithdraw::getTransTime, end) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserWithdraw::getUserId,userIds)); |
| | | |
| | | //总充值 |
| | | List<UserRecharge> userRecharges = userRechargeMapper.selectList(new LambdaQueryWrapper<UserRecharge>().eq(UserRecharge::getOrderStatus, 1) |
| | | .ge(StringUtils.isNotBlank(startTime), UserRecharge::getPayTime, startTime) |
| | | .le(StringUtils.isNotBlank(entTime), UserRecharge::getPayTime, entTime) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserRecharge::getUserId,userIds)); |
| | | //总充值 |
| | | List<UserRecharge> userRecharges = userRechargeMapper.selectList(new LambdaQueryWrapper<UserRecharge>().eq(UserRecharge::getOrderStatus, 1) |
| | | .ge(StringUtils.isNotBlank(startTime), UserRecharge::getPayTime, startTime) |
| | | .le(StringUtils.isNotBlank(entTime), UserRecharge::getPayTime, entTime) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserRecharge::getUserId,userIds)); |
| | | |
| | | //总提现 |
| | | List<UserWithdraw> userWithdraws = userWithdrawMapper.selectList(new LambdaQueryWrapper<UserWithdraw>().eq(UserWithdraw::getWithStatus, 1) |
| | | .ge(StringUtils.isNotBlank(startTime), UserWithdraw::getTransTime, startTime) |
| | | .le(StringUtils.isNotBlank(entTime), UserWithdraw::getTransTime, entTime) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserWithdraw::getUserId,userIds)); |
| | | //总提现 |
| | | List<UserWithdraw> userWithdraws = userWithdrawMapper.selectList(new LambdaQueryWrapper<UserWithdraw>().eq(UserWithdraw::getWithStatus, 1) |
| | | .ge(StringUtils.isNotBlank(startTime), UserWithdraw::getTransTime, startTime) |
| | | .le(StringUtils.isNotBlank(entTime), UserWithdraw::getTransTime, entTime) |
| | | .in(CollectionUtil.isNotEmpty(userIds),UserWithdraw::getUserId,userIds)); |
| | | |
| | | //今日注册数量 |
| | | todayRegister = userMapper.selectCount(new LambdaQueryWrapper<User>() |
| | | .ge(User::getRegTime, start) |
| | | .le(User::getRegTime, end) |
| | | .in(CollectionUtil.isNotEmpty(userIds),User::getId,userIds)); |
| | | //今日注册数量 |
| | | todayRegister = userMapper.selectCount(new LambdaQueryWrapper<User>() |
| | | .ge(User::getRegTime, start) |
| | | .le(User::getRegTime, end) |
| | | .in(CollectionUtil.isNotEmpty(userIds),User::getId,userIds)); |
| | | |
| | | for (UserRecharge userRecharge : todayRecharges) { |
| | | todayRechargeAmount = todayRechargeAmount.add(userRecharge.getPayAmt()); |
| | | for (UserRecharge userRecharge : todayRecharges) { |
| | | todayRechargeAmount = todayRechargeAmount.add(userRecharge.getPayAmt()); |
| | | } |
| | | |
| | | for (UserWithdraw userWithdraw : todayWithdraws) { |
| | | todayWithdrawAmount = todayWithdrawAmount.add(userWithdraw.getWithAmt()); |
| | | } |
| | | |
| | | for (UserRecharge userRecharge : userRecharges) { |
| | | rechargeTotalAmount = rechargeTotalAmount.add(userRecharge.getPayAmt()); |
| | | } |
| | | |
| | | for (UserWithdraw userWithdraw : userWithdraws) { |
| | | withdrawalTotalAmount = withdrawalTotalAmount.add(userWithdraw.getWithAmt()); |
| | | } |
| | | |
| | | List<UserRecharge> distinctCustomers = todayRecharges.stream() |
| | | .collect(Collectors.toMap(UserRecharge::getUserId, c -> c, (c1, c2) -> c1)) |
| | | .values().stream() |
| | | .collect(Collectors.toList()); |
| | | todayWithdraw = Long.valueOf(distinctCustomers.size()); |
| | | } |
| | | |
| | | for (UserWithdraw userWithdraw : todayWithdraws) { |
| | | todayWithdrawAmount = todayWithdrawAmount.add(userWithdraw.getWithAmt()); |
| | | } |
| | | |
| | | for (UserRecharge userRecharge : userRecharges) { |
| | | rechargeTotalAmount = rechargeTotalAmount.add(userRecharge.getPayAmt()); |
| | | } |
| | | |
| | | for (UserWithdraw userWithdraw : userWithdraws) { |
| | | withdrawalTotalAmount = withdrawalTotalAmount.add(userWithdraw.getWithAmt()); |
| | | } |
| | | |
| | | List<UserRecharge> distinctCustomers = todayRecharges.stream() |
| | | .collect(Collectors.toMap(UserRecharge::getUserId, c -> c, (c1, c2) -> c1)) |
| | | .values().stream() |
| | | .collect(Collectors.toList()); |
| | | todayWithdraw = Long.valueOf(distinctCustomers.size()); |
| | | |
| | | map.put("todayRechargeAmount", todayRechargeAmount); |
| | | map.put("todayWithdrawAmount", todayWithdrawAmount); |