shuhao 6 tháng trước cách đây
mục cha
commit
3a8b443ce8

+ 4 - 1
admin/src/main/java/com/flyer/foster/controller/app/AppTreeController.java

@@ -2,6 +2,7 @@ package com.flyer.foster.controller.app;
 
 import com.flyer.foster.dto.TreeAddDTO;
 import com.flyer.foster.dto.TreeUpdateDTO;
+import com.flyer.foster.entity.FosterRecord;
 import com.flyer.foster.entity.Tree;
 import com.flyer.foster.service.ITreeService;
 import com.flyer.util.R;
@@ -39,6 +40,8 @@ public class AppTreeController {
      */
     @GetMapping("/getRandomTree/{areaId}")
     public R getRandomTree(@PathVariable Integer areaId){
-        return R.ok().result(iTreeService.lambdaQuery().eq(Tree::getAreaId, areaId).list());
+        List<Tree> list = iTreeService.lambdaQuery().eq(Tree::getAreaId, areaId).list();
+
+        return R.ok().result(null);
     }
 }

+ 7 - 0
admin/src/main/java/com/flyer/foster/service/IFosterRecordService.java

@@ -3,6 +3,8 @@ package com.flyer.foster.service;
 import com.flyer.foster.entity.FosterRecord;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 领养记录 服务类
@@ -13,4 +15,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IFosterRecordService extends IService<FosterRecord> {
 
+    /**
+     * 验证果树是否已经被领养 返回没被领养的数组
+     */
+//    List<Integer> checkFoster
+
 }