- Timestamp:
- 02/07/23 15:27:23 (22 months ago)
- Branches:
- master
- Children:
- cb5debb
- Parents:
- fdc651c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/web/HomeController.java
rfdc651c r9eba1fb 4 4 import com.example.moviezone.model.*; 5 5 import com.example.moviezone.model.exceptions.PasswordsDoNotMatchException; 6 import com.example.moviezone.model.manytomany.ProjectionIsPlayedInRoom; 7 import com.example.moviezone.repository.ProjectionIsPlayedInRoomRepository; 6 8 import com.example.moviezone.service.*; 7 9 import org.springframework.format.annotation.DateTimeFormat; … … 29 31 private final CinemaOrganizesEventService cinemaOrganizesEventService; 30 32 private final CinemaPlaysFilmService cinemaPlaysFilmService; 31 32 public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService, CustomerRatesFilmService customerRatesFilmService, CinemaService cinemaService, CinemaOrganizesEventService cinemaOrganizesEventService, CinemaPlaysFilmService cinemaPlaysFilmService) { 33 private final ProjectionIsPlayedInRoomRepository projectionIsPlayedInRoomRepository; 34 35 public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService, CustomerRatesFilmService customerRatesFilmService, CinemaService cinemaService, CinemaOrganizesEventService cinemaOrganizesEventService, CinemaPlaysFilmService cinemaPlaysFilmService, ProjectionIsPlayedInRoomRepository projectionIsPlayedInRoomRepository) { 33 36 this.filmService = filmService; 34 37 this.userService = userService; … … 41 44 this.cinemaOrganizesEventService = cinemaOrganizesEventService; 42 45 this.cinemaPlaysFilmService = cinemaPlaysFilmService; 46 this.projectionIsPlayedInRoomRepository = projectionIsPlayedInRoomRepository; 43 47 } 44 48 … … 247 251 return "redirect:/home"; 248 252 } 253 254 @GetMapping("/getProjection/{id}") 255 public String getProjection(@PathVariable Integer id_projection,Model model) 256 { 257 List<Projection_Room> projectionRooms = null; 258 Projection projection=projectionService.findById(id_projection); 259 260 261 List<ProjectionIsPlayedInRoom> p= projectionIsPlayedInRoomRepository.findAllById_projection(id_projection); 262 263 model.addAttribute("projection",projection); 264 model.addAttribute("p_rooms",projectionRooms); 265 model.addAttribute("bodyContent","projectionDetails"); 266 return "master-template"; 267 } 268 269 @PostMapping("/makeReservation") 270 public String createTicketForReservation() 271 { 272 return "redirect:/myTickets"; 273 } 274 249 275 }
Note:
See TracChangeset
for help on using the changeset viewer.