|
|
@ -11,6 +11,7 @@ import java.util.List; |
|
|
|
|
|
|
|
|
public interface ReportRepository extends PagingAndSortingRepository<Report, Long> { |
|
|
public interface ReportRepository extends PagingAndSortingRepository<Report, Long> { |
|
|
@Query(value = "select r from Report r where " + |
|
|
@Query(value = "select r from Report r where " + |
|
|
|
|
|
"(:ids_is_empty = true or r in :ids) and " + |
|
|
"(:authors_ne = true or (position(r.a_steam2 in :authors) > 0 or position(r.r_steam2 in :authors) > 0)) and " + |
|
|
"(:authors_ne = true or (position(r.a_steam2 in :authors) > 0 or position(r.r_steam2 in :authors) > 0)) and " + |
|
|
"(:reportes_ne = true or position(r.r_steam2 in :reportes) > 0) and " + |
|
|
"(:reportes_ne = true or position(r.r_steam2 in :reportes) > 0) and " + |
|
|
"(:begin_date is null or r.utime >= :begin_date) and " + |
|
|
"(:begin_date is null or r.utime >= :begin_date) and " + |
|
|
@ -18,6 +19,8 @@ public interface ReportRepository extends PagingAndSortingRepository<Report, Lon |
|
|
"(:server_id is null or r.srv like :server_id) order by r.id desc" |
|
|
"(:server_id is null or r.srv like :server_id) order by r.id desc" |
|
|
) |
|
|
) |
|
|
Page<Report> getReports(Pageable pageable, |
|
|
Page<Report> getReports(Pageable pageable, |
|
|
|
|
|
@Param("ids_is_empty") boolean idsIsEmpty, |
|
|
|
|
|
@Param("ids") List<Long> ids, |
|
|
@Param("authors_ne") boolean authors_ne,//a
|
|
|
@Param("authors_ne") boolean authors_ne,//a
|
|
|
@Param("authors") String authors, |
|
|
@Param("authors") String authors, |
|
|
@Param("reportes_ne") boolean reportes_ne,//r
|
|
|
@Param("reportes_ne") boolean reportes_ne,//r
|
|
|
|