Changeset 61fed7c for src/main


Ignore:
Timestamp:
02/08/23 13:58:18 (23 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
39a45e6, 90317ea
Parents:
86e187f
Message:

Procedure Returns Table Fix

Location:
src/main/java/com/example/moviezone
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/repository/FilmRepository.java

    r86e187f r61fed7c  
    1515@Transactional
    1616public interface FilmRepository extends JpaRepository<Film,Integer> {
    17     @Procedure("project.getFilmsFromCinema")
    18     List<FilmsReturnTable> getFilmsFromCinema(int id);
     17    @Procedure("project.getFilmsFromCinema1")
     18    List<Film> getFilmsFromCinema(int id);
    1919
    2020}
  • src/main/java/com/example/moviezone/service/FilmService.java

    r86e187f r61fed7c  
    1313              String age_category, String url, String director, LocalDate start_date,LocalDate end_date);
    1414    Optional<Film> getFilmById(Long id);
    15     List<FilmsReturnTable> getFilmsFromCinema(int id);
     15    List<Film> getFilmsFromCinema(int id);
    1616}
  • src/main/java/com/example/moviezone/service/Impl/FilmServiceImpl.java

    r86e187f r61fed7c  
    3636
    3737    @Override
    38     public List<FilmsReturnTable> getFilmsFromCinema(int id) {
     38    public List<Film> getFilmsFromCinema(int id) {
    3939        return filmRepository.getFilmsFromCinema(id);
    4040    }
  • src/main/java/com/example/moviezone/web/HomeController.java

    r86e187f r61fed7c  
    134134
    135135    }
    136 //    @GetMapping("/films")
    137 //    public String getFilmsPage(Model model){
    138 //        model.addAttribute("cinemas",cinemaService.findAllCinemas());
    139 //            List<FilmsReturnTable> pom=new LinkedList<>();
    140 //            model.addAttribute("films",pom);
    141 //            boolean h=pom.isEmpty();
    142 //            List<FilmsReturnTable> help=filmService.getFilmsFromCinema(2);
    143 //        model.addAttribute("bodyContent","films");
    144 //        return "master-template";
    145 //    }
    146 
    147     //@GetMapping("/films")
    148     @Transactional
    149     public String getFilmsPage(Model model){
    150         model.addAttribute("cinemas",cinemaService.findAllCinemas());
    151             List<FilmsReturnTable> pom=new LinkedList<>();
    152             model.addAttribute("films",pom);
    153             boolean h=pom.isEmpty();
    154             List<FilmsReturnTable> help=filmService.getFilmsFromCinema(2);
    155         model.addAttribute("bodyContent","films");
    156         return "master-template";
    157     }
    158136
    159137
     
    172150    }
    173151
    174 //    @PostMapping("/getFilmsFromCinema")
    175 //    public String getFilmsFromCinema(@RequestParam Integer cinema, Model model){
    176 //        return getFilmsPage1(model,cinema);
    177 //    }
    178152    @GetMapping("/projections")
    179153    public String getProjectionsPage(Model model)
Note: See TracChangeset for help on using the changeset viewer.