- Timestamp:
- 02/08/23 12:10:52 (22 months ago)
- Branches:
- master
- Children:
- 86e187f
- Parents:
- c05cd97 (diff), eb36f39 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/main/java/com/example/moviezone
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/model/procedures/FilmsReturnTable.java
rc05cd97 r2a98e34 9 9 @Data 10 10 public class FilmsReturnTable { 11 Integerid_film;11 int id_film; 12 12 LocalDate start_date; 13 13 String name; … … 19 19 } 20 20 21 public IntegergetId_film() {21 public int getId_film() { 22 22 return id_film; 23 23 } -
src/main/java/com/example/moviezone/repository/FilmRepository.java
rc05cd97 r2a98e34 6 6 import org.springframework.data.jpa.repository.query.Procedure; 7 7 import org.springframework.data.repository.query.Param; 8 import org.springframework.jdbc.core.JdbcTemplate; 8 9 10 import javax.swing.tree.RowMapper; 9 11 import javax.transaction.Transactional; 12 import java.sql.ResultSet; 13 import java.sql.SQLException; 10 14 import java.util.List; 11 15 @Transactional … … 13 17 @Procedure("project.getFilmsFromCinema") 14 18 List<FilmsReturnTable> getFilmsFromCinema(int id); 19 15 20 } -
src/main/java/com/example/moviezone/web/HomeController.java
rc05cd97 r2a98e34 17 17 18 18 import javax.servlet.http.HttpSession; 19 import javax.transaction.Transactional; 19 20 import java.time.LocalDate; 20 21 import java.util.LinkedList; … … 144 145 // } 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 } 158 159 146 160 // @GetMapping("/films") 147 161 // public String getFilmsPage1(Model model,@RequestParam(required = false) Integer id_cinema){
Note:
See TracChangeset
for help on using the changeset viewer.