| 
					
				 | 
			
			
				@@ -1,13 +1,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.flyer.foster.controller.app; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.flyer.foster.dto.app.FosterRecordAddDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.flyer.foster.entity.FosterRecord; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.flyer.foster.entity.Garden; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.flyer.foster.service.IFosterRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.flyer.util.R; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import javax.validation.Valid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -24,14 +23,17 @@ public class AppFosterRecordController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IFosterRecordService iFosterRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 根据id查询领养记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 领养记录列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @GetMapping("/list/{appUserId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public R list(@PathVariable Integer appUserId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<FosterRecord> res = iFosterRecordService.lambdaQuery(). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                eq(FosterRecord::getAppUserId, appUserId).list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping("/list/{gardenId}/") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public R list(@PathVariable Integer gardenId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        Integer appUserId = (Integer)StpAppUtil.getLoginId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer appUserId = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<FosterRecord> res = service.lambdaQuery(). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                eq(FosterRecord::getAppUserId, appUserId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eq(FosterRecord::getGardenId, gardenId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .list(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return R.ok().result(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |