| | |
| | | .filter(p -> p.getId() != null && p.getSalesLedgerId() != null) |
| | | .collect(Collectors.toMap(SalesLedgerProduct::getId, SalesLedgerProduct::getSalesLedgerId, (k1, k2) -> k1)); |
| | | |
| | | List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getStatus, "审核通过")); |
| | | List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(null); |
| | | |
| | | long shippedOrderCount = shippingInfos.stream() |
| | | .filter(info -> productIdToLedgerIdMap.containsKey(info.getSalesLedgerProductId())) |
| | | .map(info -> { |
| | | if (info.getSalesLedgerId() != null) { |
| | | return info.getSalesLedgerId(); |
| | | } |
| | | return productIdToLedgerIdMap.get(info.getSalesLedgerProductId()); |
| | | }) |
| | | .map(ShippingInfo::getSalesLedgerId) |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .count(); |