Browse Source

分页修复

yinhao 4 years ago
parent
commit
6abefb4e0d

+ 1 - 1
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/controller/MFattenAreaController.java

@@ -25,7 +25,7 @@ public class MFattenAreaController {
 	@RequestMapping("/update")
 	public Result update(MFattenArea childcareEntity){ return service.update(childcareEntity); }
 
-
+	@RequestMapping("findAll")
 	public Result findAll(String name , Integer pageNum , Integer pageSize){
 		return service.findAll(name,pageNum,pageSize);
 	}

+ 1 - 1
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/MSowAblactationEntityRepo.java

@@ -12,6 +12,6 @@ public interface MSowAblactationEntityRepo extends JpaRepository<MSowAblactation
 
     List<MSowAblactationEntity> findAllByState(int i);
 
-    @Query(nativeQuery = true ,value = "select * from MSowAblactationEntity where location like %?1% limit ?2 , ?3")
+    @Query(nativeQuery = true ,value = "select * from m_sow_ablactation where location like %?1% limit ?2 , ?3")
     List<MSowAblactationEntity> findAll(String name , Integer startPage , Integer pageSize);
 }

+ 1 - 1
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/MSowHeatRepository.java

@@ -12,7 +12,7 @@ public interface MSowHeatRepository extends JpaRepository<MSowHeat, Integer>,Jpa
 
     List findAllBySowCode(String sowCode);
 
-    @Query(nativeQuery = true ,value = "select * from m_sow_feed where animal_heat like %?1% limit ?2 , ?3")
+    @Query(nativeQuery = true ,value = "select * from m_sow_heat where sow_code like %?1% limit ?2 , ?3")
     List<MSowHeat> findAll(String name , Integer startPage , Integer pageSize);
 
 }

+ 1 - 1
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/repo/MSowNonpregnantEntityRepo.java

@@ -12,6 +12,6 @@ public interface MSowNonpregnantEntityRepo extends JpaRepository<MSowNonpregnant
 
     List<MSowNonpregnantEntity> findAllByState(int i);
 
-    @Query(nativeQuery = true ,value = "select * from m_sow_nonpregnant where sow_code like %?1% limit ?2 , ?3")
+    @Query(nativeQuery = true ,value = "select * from m_sow_nonpregnant where location like %?1% limit ?2 , ?3")
     List<MSowNonpregnantEntity> findAll(String name , Integer startPage , Integer pageSize);
 }

+ 1 - 1
huimv-ql-farm/huimv-ql-production/src/main/java/com/huimv/production/service/impl/MSowHeatServiceImpl.java

@@ -71,7 +71,7 @@ public class MSowHeatServiceImpl implements MSowHeatService {
 			map.put("total",size);
 			map.put("totalPageNum",(size  +  pageSize  - 1) / pageSize);
 			map.put("data",all);
-			return new Result(10000, ResultStatus.findSuccess,all);
+			return new Result(10000, ResultStatus.findSuccess,map);
 		}catch (Exception e){
 			return new Result(10001, ResultStatus.findFailed,null);
 		}