From 38bf6d26c02f2861abdbe95b8e2a1312e6f30202 Mon Sep 17 00:00:00 2001 From: zqy <2522236926@qq.com> Date: 星期一, 04 十一月 2024 18:04:48 +0800 Subject: [PATCH] 删除宠物将对应的备忘本一并删除 --- zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java | 9 +++------ 1 files changed, 3 insertions(+), 6 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 c70526e..a0f7b05 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 @@ -51,10 +51,8 @@ ZAuthorityService zAuthorityService; @Resource - ZfPetSharService zfPetSharService; + ZfPetNoteService zfPetNoteService; - @Resource - ZfPetDownlService zfPetDownlService; @Override public AjaxResult selectDataList(ZfPet zfPet, Integer pageNum, Integer pageSize) { // LambdaQueryWrapper<ZfPet> lqw = buildCondition(zfPet); @@ -271,9 +269,8 @@ if (!familyIdList.contains(data.getFamilyId())){ throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�"); } - } - if (! (zfPetDownlService.deleteData(ids) && zfPetSharService.deleteByContentId(ids) ) ){ - return AjaxResult.error(); + if (!zfPetNoteService.removeBatchByIds(zfPetNoteService.getPetNoteByPetId(data.getId()))) + return AjaxResult.error(); } if (zfPetService.removeByIds(Arrays.asList(ids))) { -- Gitblit v1.9.1