| | |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | SysUser sysUser = sysUserClient.getSysUser(loginUser.getUserid()).getData(); |
| | | Shop byId = shopService.getById(sysUser.getObjectId()); |
| | | List<ShopWithdraw> list = shopWithdrawService.lambdaQuery().eq(ShopWithdraw::getShopId, sysUser.getObjectId()) |
| | | .eq(ShopWithdraw::getAuditStatus, 0).list(); |
| | | List<ShopWithdraw> list = shopWithdrawService.lambdaQuery() |
| | | .eq(ShopWithdraw::getShopId, sysUser.getObjectId()) |
| | | .list(); |
| | | |
| | | |
| | | if (!list.isEmpty()){ |
| | | BigDecimal bigDecimal = list.stream().map(ShopWithdraw::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO); |
| | | // 待审核列表 |
| | | List<ShopWithdraw> toBeReviewList = list.stream() |
| | | .filter(s -> s.getAuditStatus() == 0) |
| | | .collect(Collectors.toList()); |
| | | // 审核通过列表 |
| | | List<ShopWithdraw> passedReviewList = list.stream() |
| | | .filter(s -> s.getAuditStatus() == 1) |
| | | .collect(Collectors.toList()); |
| | | |
| | | BigDecimal bigDecimal = toBeReviewList.stream().map(ShopWithdraw::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO); |
| | | byId.setWithdrawAuditMoney(bigDecimal); |
| | | |
| | | BigDecimal bigDecimal1 = passedReviewList.stream().map(ShopWithdraw::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO); |
| | | byId.setWithdrawMoney(bigDecimal1); |
| | | }else { |
| | | byId.setWithdrawAuditMoney(BigDecimal.ZERO); |
| | | } |