//对象集合 List<OrderInfo> orderInfoList = new OrderInfo //根据名称进行模糊匹配 查询条件:searchName List<OrderInfo> filterInfo= orderInfoList .stream().filter(orderInfo-> Boolean.FALSE?orderInfo.getName().equals(searchName): orderInfo.getName().contains(searchName)) .sorted(Comparator.comparing(OrderInfo::getCreateTime).reversed) .collect(Collectors.toList());