|
@@ -1,6 +1,7 @@
|
|
package com.huimv.production.repo;
|
|
package com.huimv.production.repo;
|
|
|
|
|
|
import com.huimv.production.domain.MSowAnimalHeatEntity;
|
|
import com.huimv.production.domain.MSowAnimalHeatEntity;
|
|
|
|
+import com.huimv.production.domain.MSowEntity;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
@@ -13,4 +14,7 @@ public interface MSowAnimalHeatEntityRepo extends JpaRepository<MSowAnimalHeatEn
|
|
|
|
|
|
@Query(nativeQuery = true,value = "SELECT AVG(heat), measure_time FROM `m_sow_animal_heat` GROUP BY measure_time")
|
|
@Query(nativeQuery = true,value = "SELECT AVG(heat), measure_time FROM `m_sow_animal_heat` GROUP BY measure_time")
|
|
List<List> findAllBy();
|
|
List<List> findAllBy();
|
|
|
|
+
|
|
|
|
+ @Query(nativeQuery = true ,value = "select * from m_sow_animal_heat where location_id like %?1% limit ?2 , ?3")
|
|
|
|
+ List<MSowAnimalHeatEntity> findAll(String name , Integer startPage , Integer pageSize);
|
|
}
|
|
}
|