Example #1
0
 private void buildContactUsStatisticBean(
     List<OverviewStatisticBean> statisticBeans,
     Date toDate,
     Date fromLast7Days,
     Date fromLast30Days) {
   int total = ((Long) contactUsRepo.count()).intValue();
   int last7Days =
       contactUsRepo.countInDateRange(fromLast7Days, toDate, ContactUs.class.getName());
   int last30Days =
       contactUsRepo.countInDateRange(fromLast30Days, toDate, ContactUs.class.getName());
   OverviewStatisticBean statisticBean =
       new OverviewStatisticBean(
           "Contact Us Request",
           total,
           last7Days,
           last30Days,
           WebConstants.FixValue.CONTACT_US_REPORT);
   statisticBeans.add(statisticBean);
 }
Example #2
0
 public List<StatisticDetailsBean> getContactUsStatisticData(Date from, Date to) {
   List<StatisticDetailsBean> results = new ArrayList<StatisticDetailsBean>();
   List<ContactUs> contacts = contactUsRepo.findInDateRange(from, to);
   StatisticDetailsBean contactDetailsBean = null;
   for (ContactUs c : contacts) {
     contactDetailsBean =
         new StatisticDetailsBean(c.getContactId(), c.getName(), c.getEmail(), c.getCreatedDate());
     results.add(contactDetailsBean);
   }
   return results;
 }