gsd 1 month ago
parent
commit
3dd79f39ec
  1. 2
      src/main/java/app/repositories/BanRepository.java
  2. 2
      src/main/java/app/repositories/MessageRepository.java

2
src/main/java/app/repositories/BanRepository.java

@ -16,7 +16,7 @@ public interface BanRepository extends PagingAndSortingRepository<Ban, Long> {
"(: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 " +
"(: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 " +
"(: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.unbanned_by_id in :admin_ids) order by b.id desc")
Page<Ban> getBans(Pageable pageable,

2
src/main/java/app/repositories/MessageRepository.java

@ -12,7 +12,7 @@ public interface MessageRepository extends PagingAndSortingRepository<Message, L
@Query(value = "select m from Message m where " +
"(:account_ids_non_exists = true or m.account_id in :account_ids) and " +
"(:begin_date is null or m.utime >= :begin_date) and " +
"(:end_date is null or :end_date <= m.utime) and " +
"(:end_date is null or :end_date >= m.utime) and " +
"(:message_contain is null or m.message like :message_contain) and " +
"(:server_id is null or m.server_id like :server_id) order by m.id desc ")
Page<Message> getMessages(Pageable pageable,

Loading…
Cancel
Save