|
@@ -1,7 +1,10 @@
|
|
|
package com.flyer.foster.controller.app;
|
|
|
|
|
|
+import cn.dev33.satoken.annotation.SaIgnore;
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.flyer.foster.entity.FosterRecord;
|
|
|
import com.flyer.foster.entity.Garden;
|
|
|
+import com.flyer.foster.pojo.StpAppUtil;
|
|
|
import com.flyer.foster.service.IFosterRecordService;
|
|
|
import com.flyer.util.R;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -23,13 +26,17 @@ public class AppFosterRecordController {
|
|
|
IFosterRecordService service;
|
|
|
|
|
|
/**
|
|
|
- * 果园列表
|
|
|
+ * 领养记录列表
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping("/list/{appUserId}")
|
|
|
- public R list(@PathVariable Integer appUserId) {
|
|
|
+ @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).list();
|
|
|
+ eq(FosterRecord::getAppUserId, appUserId)
|
|
|
+ .eq(FosterRecord::getGardenId, gardenId)
|
|
|
+ .list();
|
|
|
return R.ok().result(res);
|
|
|
}
|
|
|
|