From e55c8b0a92eb9715edd90c31dfd4de51a47b588b Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期五, 04 十一月 2022 17:40:08 +0800
Subject: [PATCH] changes
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedSFileService.java | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedSFileService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedSFileService.java
index a97bcfa..b16fbe5 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedSFileService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedSFileService.java
@@ -64,21 +64,24 @@
return save(sFile);
}
- public boolean deleteFile(Long id) {
- LedSFile byId = getById(id);
- if (byId == null) {
+ public boolean deleteFile(List<Long> fileIds) {
+ if (fileIds.isEmpty()) {
+ throw new BusinessException("鏂囦欢id涓嶈兘涓虹┖");
+ }
+ List<LedSFile> ledSFiles = listByIds(fileIds);
+ if (ledSFiles.isEmpty()) {
throw new BusinessException("鏈壘鍒拌鑺傜洰");
}
/**
* 鐔欐睕鏂囦欢鍒犻櫎 鏃ュ織璁板綍寮�濮�
*/
- String content = "鏂囦欢鍐呭id:" + id + "鏂囦欢鍐呭:" + JSON.toJSONString(byId);
+ String content = "鏂囦欢鍐呭id:" + fileIds + "鏂囦欢鍐呭:" + JSON.toJSONString(ledSFiles);
StoreOperationRecordsUtils.storeOperationData(null, null, "鐔欐睕鏂囦欢鍒犻櫎", content);
/**
* 鐔欐睕鏂囦欢鍒犻櫎 鏃ュ織璁板綍缁撴潫
*/
- return removeById(id);
+ return removeByIds(fileIds);
}
--
Gitblit v1.9.3