Skip to content

Commit

Permalink
#361 remove unused query
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Nov 22, 2018
1 parent 4e4ada0 commit c220b3a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions src/main/java/alfio/repository/GroupRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ Optional<GroupMember> findItemEndsWith(@Bind("configurationId") int configuratio
@Bind("groupId") int groupId,
@Bind("value") String value);

@Query("select * from whitelisted_ticket where a_group_id_fk = :itemId and group_link_id_fk = :configurationId")
Optional<WhitelistedTicket> findExistingWhitelistedTicket(@Bind("itemId") int itemId,
@Bind("configurationId") int configurationId);

@Query("select count(*) from whitelisted_ticket where group_member_id_fk = :itemId and group_link_id_fk = :configurationId")
int countExistingWhitelistedTickets(@Bind("itemId") int itemId,
@Bind("configurationId") int configurationId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ int addPromoCode(@Bind("promoCode") String promoCode,
@Query("select count(*) from promo_code where (event_id_fk = :eventId and organization_id_fk is null) or (event_id_fk is null and organization_id_fk = :organizationId)")
Integer countByEventAndOrganizationId(@Bind("eventId") int eventId, @Bind("organizationId") int organizationId);

@Query("select count(*) from tickets_reservation where promo_code_id_fk = :id")
Integer countAppliedPromoCode(@Bind("id") int id);

@Query("select count(b.id) from tickets_reservation a, ticket b" +
" where (:currentId is null or a.id <> :currentId) and a.status in ('OFFLINE_PAYMENT', 'COMPLETE', 'STUCK') and a.promo_code_id_fk = :id" +
" and b.tickets_reservation_id = a.id and (:categoriesJson is null or b.category_id in (:categories))")
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/alfio/repository/TicketRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,6 @@ default Set<String> findAllReservationsConfirmedButNotAssignedForUpdate(int even
@Query("select count(*) from ticket where event_id = :eventId and category_id is not null and status <> 'INVALIDATED'")
Integer countAllocatedTicketsForEvent(@Bind("eventId") int eventId);

@Query("select count(*) from ticket where tickets_reservation_id = :reservationId and uuid in (:uuids)")
Integer countFoundTicketsInReservation(@Bind("reservationId") String reservationId, @Bind("uuids") Set<String> uuids);

default boolean checkTicketUUIDs(String reservationId, Set<String> uuids) {
return countFoundTicketsInReservation(reservationId, uuids) == uuids.size();
}

@Query("update ticket set status = 'FREE' where event_id = :eventId and category_id in(:categoryId) and status = '"+RELEASED+"'")
int revertToFreeForRestrictedCategories(@Bind("eventId") int eventId, @Bind("categoryId") List<Integer> categoryId);
}

0 comments on commit c220b3a

Please sign in to comment.