| | |
| | | Date now = new Date(); |
| | | List<TCommissionTransactionFlow> list = commissionTransactionFlowService.lambdaQuery().eq(TCommissionTransactionFlow::getAppUserId, userId) |
| | | .between(TCommissionTransactionFlow::getCreateTime, DateUtil.beginOfMonth(now), DateUtil.endOfMonth(now)).list(); |
| | | Integer total = list.stream().mapToInt(TCommissionTransactionFlow::getCommissionAmount).sum(); |
| | | BigDecimal total = list.stream().map(TCommissionTransactionFlow::getCommissionAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | appUser.setEstimatedMonthlyIntegral(total); |
| | | } |
| | | return R.ok(appUser); |