shuhao 5 月之前
父节点
当前提交
56d8c9ca28
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      admin/src/main/java/com/flyer/foster/controller/app/AppFosterRecordController.java

+ 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());
     }