Commit c4eda0cf authored by Vijay Akula's avatar Vijay Akula

Resolved the issue in fetching the records of billing based on createdon

parent b88caf13
......@@ -52,8 +52,8 @@ public class BillingService implements IBillingService {
if (billingsList == null || billingsList.size() == 0) {
return billingsList;
} else {
return billingsList.stream().sorted(Comparator.comparing(Billing::getCreatedOn).reversed())
.collect(Collectors.toList());
//return billingsList.stream().sorted(Comparator.comparing(Billing::getCreatedOn).reversed()).collect(Collectors.toList());
return billingsList.stream().sorted(Comparator.comparing(Billing::getBillingStartDate).reversed()).collect(Collectors.toList());
}
}
......@@ -65,8 +65,9 @@ public class BillingService implements IBillingService {
return billingsList;
} else {
log.info("The billing list before sorting::"+billingsList);
return billingsList.stream().sorted(Comparator.comparing(Billing::getCreatedOn).reversed())
.collect(Collectors.toList());
//return billingsList.stream().sorted(Comparator.comparing(Billing::getCreatedOn).reversed()).collect(Collectors.toList());
return billingsList.stream().sorted(Comparator.comparing(Billing::getBillingStartDate).reversed()).collect(Collectors.toList());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment