|
|
@ -15,8 +15,8 @@ public interface BanRepository extends PagingAndSortingRepository<Ban, Long> { |
|
|
@Query(value = "select b from Ban b where " + |
|
|
@Query(value = "select b from Ban b where " + |
|
|
"(:ban_ids_non_exists = true or b.id in :ban_ids) and " + |
|
|
"(:ban_ids_non_exists = true or b.id in :ban_ids) and " + |
|
|
"(:account_ids_non_exists = true or b.account_id in :account_ids) and " + |
|
|
"(:account_ids_non_exists = true or b.account_id in :account_ids) and " + |
|
|
"(:begin_date is null or DATE_PART('EPOCH', b.timestamp) >= :begin_date) and " + |
|
|
"(:begin_date_null is null or DATE_PART('EPOCH', b.timestamp) >= :begin_date) and " + |
|
|
"(:end_date is null or :end_date >= DATE_PART('EPOCH', b.timestamp)) and " + |
|
|
"(:end_date_null is null or :end_date >= DATE_PART('EPOCH', b.timestamp)) and " + |
|
|
"(:active is null or b.active = :active) and " + |
|
|
"(:active is null or b.active = :active) and " + |
|
|
"(:admin_ids_non_exists = true or b.banned_by_id in :admin_ids) and" + |
|
|
"(:admin_ids_non_exists = true or b.banned_by_id in :admin_ids) and" + |
|
|
"(b.ban_reason like :reason) order by b.id desc") |
|
|
"(b.ban_reason like :reason) order by b.id desc") |
|
|
@ -30,5 +30,7 @@ public interface BanRepository extends PagingAndSortingRepository<Ban, Long> { |
|
|
@Param(value = "active") Boolean active, |
|
|
@Param(value = "active") Boolean active, |
|
|
@Param(value = "admin_ids_non_exists") Boolean admin_ids_non_exists, |
|
|
@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); |
|
|
@Param(value = "reason") String reason, |
|
|
|
|
|
@Param(value = "begin_date_null") Long begin_date_null, |
|
|
|
|
|
@Param(value = "end_date_null") Long end_date_null); |
|
|
} |
|
|
} |
|
|
|