WIP: Resolve "Статистика по активностям" #232
@ -3,17 +3,17 @@ package ru.ulstu.user.repository;
|
|||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
//import ru.ulstu.user.model.Activity;
|
import ru.ulstu.user.model.Activity;
|
||||||
//
|
|
||||||
//import java.util.Date;
|
import java.util.Date;
|
||||||
//import java.util.List;
|
import java.util.List;
|
||||||
//
|
|
||||||
//public interface ActivityRepository extends JpaRepository<Activity, Integer> {
|
public interface ActivityRepository extends JpaRepository<Activity, Integer> {
|
||||||
//
|
|
||||||
// @Query("SELECT a FROM Activity a WHERE (:userId IS NULL OR a.user.id = :userId) " +
|
@Query("SELECT a FROM Activity a WHERE (:userId IS NULL OR a.user.id = :userId) " +
|
||||||
// "AND (CAST(:dateFrom AS date) IS NULL OR :dateFrom < a.date) " +
|
"AND (CAST(:dateFrom AS date) IS NULL OR :dateFrom < a.date) " +
|
||||||
// "AND (CAST(:dateTo AS date) IS NULL OR :dateTo > a.date)")
|
"AND (CAST(:dateTo AS date) IS NULL OR :dateTo > a.date)")
|
||||||
// List<Activity> getByUserAndDateInterval(@Param("userId") Integer userId,
|
List<Activity> getByUserAndDateInterval(@Param("userId") Integer userId,
|
||||||
// @Param("dateFrom") Date dateFrom,
|
@Param("dateFrom") Date dateFrom,
|
||||||
// @Param("dateTo") Date dateTo);
|
@Param("dateTo") Date dateTo);
|
||||||
//}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user