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/IZfPropertyServiceImpl.java | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java index 0c73e22..05ceaf2 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java @@ -65,6 +65,12 @@ @Resource RestHighLevelClient restHighLevelClient; + @Resource + private IZfPropertyDownloadService zfPropertyDownloadService; + + @Resource + private IZfPropertyShareService iZfPropertyShareService; + // private LambdaQueryWrapper<ZfProperty> buildCondition(ZfProperty zfProperty) { // LambdaQueryWrapper<ZfProperty> lqw = new LambdaQueryWrapper<>(); @@ -290,7 +296,7 @@ fatherFaId = zInfoUserService.getInfoById(myself.getFatherId()).getFamilyId(); Long motherFaId = 0L; if(myself.getMomId()!=null) - motherFaId = zInfoUserService.getInfoBysysId(myself.getMomId()).getFamilyId(); + motherFaId = zInfoUserService.getInfoById(myself.getMomId()).getFamilyId(); //鍔犱笂鑷繁瀹跺涵鐨刬d idList.add(familyId); @@ -567,6 +573,9 @@ List<ZfProperty> zfPropertys = listByIds(Arrays.asList(ids)); + if (! (zfPropertyDownloadService.deleteData(ids) && iZfPropertyShareService.deleteByContentId(ids) ) ){ + return AjaxResult.error(); + } if (zfPropertyService.removeByIds(Arrays.asList(ids))) { //鍒犻櫎es涓殑鏁版嵁 @@ -581,6 +590,8 @@ throw new RuntimeException(e); }} }); + System.out.println("15165132165346153246153"); + return AjaxResult.success(); }else { return AjaxResult.error(); -- Gitblit v1.9.1