| | |
| | | .orderByAsc(Order::getCreateTime)); |
| | | |
| | | |
| | | Map<String, List<Order>> map = orderList.stream().collect(Collectors.groupingBy(item -> item.getCreateTime() |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))); |
| | | Map<String, List<Order>> map = orderList.stream() |
| | | .collect(Collectors.groupingBy( |
| | | item -> item.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), |
| | | TreeMap::new, // 使用 TreeMap 按键排序 |
| | | Collectors.toList() |
| | | )); |
| | | |
| | | List<OrderStatisticsDetail> orderStatisticsDetails = new ArrayList<>(); |
| | | map.forEach((key, value) -> { |