// JDK8 之前
for (FlightOrderTicket flightOrderTicket : tickets) {
names.append(flightOrderTicket.getName()).append(",");
}
// JDK 8
tickets.subList(0, tickets.size()).forEach(a -> {
names.append(a.getName()).append(",");
});