Exemplo n.º 1
0
 @RequestMapping(value = "/stats/all", method = RequestMethod.GET)
 public @ResponseBody List<CompanyStats> getStatsForCompanies(
     @RequestParam(value = "showActive", required = false) Boolean active) {
   if (active == null) {
     return statsService.getStatsForAllCompanies();
   }
   return active
       ? statsService.getStatsForActiveCompanies()
       : statsService.getStatsForInactiveCompanies();
 }
Exemplo n.º 2
0
 @RequestMapping(value = "/stats", method = RequestMethod.GET)
 public @ResponseBody CompanyStats getStatsForCompany(@RequestParam("company_id") Long companyId) {
   CompanyStats response = statsService.getStatsForCompany(companyId);
   return response;
 }
Exemplo n.º 3
0
 @RequestMapping(value = "/stats/attributes", method = RequestMethod.POST)
 public @ResponseBody SearchRequestAttributes addRequestAttributes(
     @RequestBody SearchRequestAttributes searchRequestAttributes) {
   statsService.storeAttributes(searchRequestAttributes);
   return searchRequestAttributes;
 }