From f1ef1f2baf4e58733c4913ce5df0b3d2ea582308 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 12 十一月 2025 16:49:08 +0800
Subject: [PATCH] 修改了一个bug
---
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipDownloadServiceImpl.java | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipDownloadServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipDownloadServiceImpl.java
index 7953ce3..e925f03 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipDownloadServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipDownloadServiceImpl.java
@@ -32,7 +32,7 @@
EsService esService;
@Resource
- ZfEquipShareServiceImpl zfEquipShareService;
+ ZfEquipShareService zfEquipShareService;
@Resource
ZfEquipmentService zfEquipmentService;
@@ -96,14 +96,29 @@
}
@Override
- public AjaxResult deleteData(Long[] ids) {
- List<ZfDownload> zfDownloads = listByIds(Arrays.asList(ids));
+ public Boolean deleteData(Long[] ids) {
+ List<Long> id = new ArrayList<>();
- if (zfEquipShareService.removeByIds(Arrays.asList(ids))) {
+ LambdaQueryWrapper<ZfDownload> lqw = new LambdaQueryWrapper<>();
+ lqw.in(ids != null, ZfDownload::getDownloadContent, ids)
+ .eq(ZfDownload::getSysMenuId, 2017L);
+
+ List<ZfDownload> zfDownloads = list(lqw);
+ System.out.println(zfDownloads);
+ if (zfDownloads.size() == 0){
+ return true;
+ }
+ for (ZfDownload zfDownload: zfDownloads) {
+ id.add(zfDownload.getId());
+ }
+ System.out.println("15102120202121212122222222221");
+ System.out.println(id);
+ if (removeByIds(id)) {
+ System.out.println("4535468486525852");
//鍒犻櫎es涓殑鏁版嵁
zfDownloads.stream().forEach(zfDoctorDownload -> {
- EsModel esModel = esService.findByCtId(zfDoctorDownload.getId().intValue(), "瀹跺涵璁惧涓嬭浇");
+ EsModel esModel = esService.findByCtId(zfDoctorDownload.getId().intValue(), "瀹跺涵璁惧涓嬭浇鍒犻櫎" );
if (esModel != null) {
DeleteRequest deleteRequest = new DeleteRequest("allsearchdata", esModel.getId());
@@ -114,9 +129,9 @@
}
}
});
- return AjaxResult.success();
+ return true;
} else {
- return AjaxResult.error();
+ return false;
}
}
--
Gitblit v1.9.1