| | |
| | | return type.indexOf(symbolType.toUpperCase()) != -1; |
| | | }).collect(Collectors.toList()); |
| | | } else { |
| | | list_it = list_it.stream().filter(i -> symbolType.equalsIgnoreCase(i.getType())).collect(Collectors.toList()); |
| | | // 与 /api/publicRealtimeByType 保持一致:按 sorted 倒序,再按 type 过滤(不分页) |
| | | list_it = itemService.cacheGetAll().stream() |
| | | .sorted(Comparator.comparing( |
| | | item -> Integer.parseInt(item.getSorted()), |
| | | Comparator.reverseOrder() |
| | | )) |
| | | .filter(i -> symbolType.equalsIgnoreCase(i.getType())) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
| | | List<String> list_symbol = new ArrayList<>(); |