示例#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();
 }
示例#2
0
 @RequestMapping(value = "/stats", method = RequestMethod.GET)
 public @ResponseBody CompanyStats getStatsForCompany(@RequestParam("company_id") Long companyId) {
   CompanyStats response = statsService.getStatsForCompany(companyId);
   return response;
 }
示例#3
0
 @RequestMapping(value = "/stats/attributes", method = RequestMethod.POST)
 public @ResponseBody SearchRequestAttributes addRequestAttributes(
     @RequestBody SearchRequestAttributes searchRequestAttributes) {
   statsService.storeAttributes(searchRequestAttributes);
   return searchRequestAttributes;
 }