Ignore:
Timestamp:
08/24/23 03:31:06 (16 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
4158cac
Parents:
1e7126f
Message:

filter for genre

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/service/Impl/SeatServiceImpl.java

    r1e7126f rbcb4acc  
    4343        List<Ticket> tickets=ticketService.findAllTickets();
    4444        List<Seat> seats=seatRepository.findAllByCategoryAndProjection(category,projectionRoom);
    45 
     45        List<Seat> pom = new ArrayList<>();
    4646        for (int i = 0; i < tickets.size(); i++) {
    4747            if(tickets.get(i).getProjection()==projection){
    48                 if(seats.contains(tickets.get(i).getSeat())){
    49                     seats.remove(tickets.get(i).getSeat());
     48                if(!seats.contains(tickets.get(i).getSeat())){
     49                    pom.add(seats.get(i));
    5050                }
    5151            }
    5252        }
    53         return seats;
     53        return pom;
    5454    }
    5555
Note: See TracChangeset for help on using the changeset viewer.