|
|
@ -18,7 +18,8 @@ public interface BanRepository extends PagingAndSortingRepository<Ban, Long> { |
|
|
|
"(:begin_date is null or DATE_PART('EPOCH', b.timestamp) >= :begin_date) and " + |
|
|
|
"(:end_date is null or :end_date >= DATE_PART('EPOCH', b.timestamp)) and " + |
|
|
|
"(:active is null or b.active = :active) and " + |
|
|
|
"(:admin_ids_non_exists = true or b.banned_by_id in :admin_ids) order by b.id desc") |
|
|
|
"(:admin_ids_non_exists = true or b.banned_by_id in :admin_ids) and" + |
|
|
|
"(b.ban_reason like :reason) order by b.id desc") |
|
|
|
Page<Ban> getBans(Pageable pageable, |
|
|
|
@Param(value = "ban_ids_non_exists") Boolean ban_ids_non_exists, |
|
|
|
@Param(value = "ban_ids") Iterable<Long> ban_ids, |
|
|
@ -28,5 +29,6 @@ public interface BanRepository extends PagingAndSortingRepository<Ban, Long> { |
|
|
|
@Param(value = "end_date") Long end_date, |
|
|
|
@Param(value = "active") Boolean active, |
|
|
|
@Param(value = "admin_ids_non_exists") Boolean admin_ids_non_exists, |
|
|
|
@Param(value = "admin_ids") Iterable<String> admin_ids); |
|
|
|
@Param(value = "admin_ids") Iterable<String> admin_ids, |
|
|
|
@Param(value = "reason") String reason); |
|
|
|
} |
|
|
|