From 9b2e78080fd730b87f6aa6fc2c3e89e2c0df5ad9 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期二, 05 十一月 2024 21:28:02 +0800
Subject: [PATCH] 修改不能删除的bug

---
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
index f36cac4..a25b70e 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -275,7 +275,9 @@
             if (!familyIdList.contains(data.getFamilyId())){
                 throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
             }
-            if (!zfPetNoteService.removeBatchByIds(zfPetNoteService.getPetNoteByPetId(data.getId())))
+            List<ZfPetNote> petNoteByPetId = zfPetNoteService.getPetNoteByPetId(data.getId());
+            if(petNoteByPetId.size() != 0)
+            if (!zfPetNoteService.removeBatchByIds(petNoteByPetId))
                 return AjaxResult.error();
         }
         if (! (zfPetDownlService.deleteData(ids) && zfPetSharService.deleteByContentId(ids)  ) ){

--
Gitblit v1.9.1