shuhao hai 5 meses
pai
achega
56d8c9ca28

+ 3 - 1
admin/src/main/java/com/flyer/foster/controller/app/AppFosterRecordController.java

@@ -48,10 +48,12 @@ public class AppFosterRecordController {
      */
     @PutMapping("")
     public R update(@RequestBody FosterRecord updateDTO) {
+        String appUserId = StpAppUtil.getLoginId().toString();
         return R.ok().result(
                 iFosterRecordService.lambdaUpdate()
                         .set(FosterRecord::getName, updateDTO.getName())
-                        .eq(FosterRecord::getId, updateDTO.getId())
+                        .eq(FosterRecord::getAppUserId, appUserId)
+                        .eq(FosterRecord::getGardenId, updateDTO.getGardenId())
                         .update());
     }