From 4aed7fb3796dc58fff24ea90421798c166cfee80 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期四, 24 十月 2024 09:51:47 +0800 Subject: [PATCH] 修改了bug --- zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java index efac001..dcdcb16 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java @@ -56,6 +56,12 @@ @Resource private RestHighLevelClient restHighLevelClient; + @Resource + private ZfEquipShareService zfEquipShareService; + + @Resource + private ZfEquipDownloadService zfEquipDownloadService; + private LambdaQueryWrapper<ZfEquipment> buildCondition(ZfEquipment zfEquipment,List<Long> familyIdList) { LambdaQueryWrapper<ZfEquipment> lqw = new LambdaQueryWrapper<>(); lqw.orderByDesc(ZfEquipment::getCreateTime); @@ -589,6 +595,9 @@ } List<ZfEquipment> zfEquipments = listByIds(Arrays.asList(ids)); + if (! (zfEquipDownloadService.deleteData(ids) && zfEquipShareService.deleteByContentId(ids) ) ){ + return AjaxResult.error(); + } if (zfEquipmentService.removeByIds(Arrays.asList(ids))) { @@ -604,6 +613,7 @@ } } }); + return AjaxResult.success(); }else { return AjaxResult.error(); -- Gitblit v1.9.1