use of com.salesmanager.shop.populator.customer.ReadableCustomerList in project shopizer by shopizer-ecommerce.
the class CustomerFacadeImpl method convertCustomerListToReadableCustomerList.
private ReadableCustomerList convertCustomerListToReadableCustomerList(CustomerList customerList, MerchantStore store, Language language) {
List<ReadableCustomer> readableCustomers = customerList.getCustomers().stream().map(customer -> convertCustomerToReadableCustomer(customer, store, language)).collect(Collectors.toList());
ReadableCustomerList readableCustomerList = new ReadableCustomerList();
readableCustomerList.setCustomers(readableCustomers);
readableCustomerList.setTotalPages(Math.toIntExact(customerList.getTotalCount()));
return readableCustomerList;
}
Aggregations