@RequestMapping(value = "/tickets/{d}", method = RequestMethod.GET)
 public String getPaidTicketPage(Model model, @PathVariable("d") int d) {
   TicketsEntity ticket = ticketService.getTicketEntityById(d);
   if (ticket.getPaid()) {
     model.addAttribute("message", "This ticket is paid!");
     return "redirect:/personal/tickets";
   }
   model.addAttribute("ticket", ticket);
   return "ticket_page";
 }
 @RequestMapping(value = "/tickets/{d}", method = RequestMethod.POST)
 public String getPaidTicketAddPage(Model model, @PathVariable("d") int d) {
   ticketService.editTicket(d);
   return "redirect:/personal/tickets";
 }
 @RequestMapping(value = "/tickets/all", method = RequestMethod.GET)
 public String getTicketsPage(Model model) {
   List tickets = ticketService.getAllTickets();
   model.addAttribute("tickets", tickets);
   return "all_tickets";
 }
 @RequestMapping(value = "/tickets", method = RequestMethod.GET)
 public String getPaidTicketsPage(Model model) {
   List tickets = ticketService.getTicketsPaid(false);
   model.addAttribute("tickets", tickets);
   return "paid_tickets";
 }