From f8c33ad3fb09dd0f70b68b74d59ce28761142bf0 Mon Sep 17 00:00:00 2001
From: Van333 <van666666@foxmail.com>
Date: 星期一, 14 十一月 2022 15:21:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/xm-20221107' into xm-20221107

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
index e112f59..6d90489 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -129,26 +129,26 @@
     /**
      * 鍒犻櫎鐏潌
      */
-    public boolean deletePole(Long poleId) {
-        Pole pole = getById(poleId);
-        if (pole == null) {
+    public boolean deletePole(List<Long> poleIds) {
+        List<Pole> poles = listByIds(poleIds);
+        if (poles.isEmpty()) {
             throw new BusinessException("鏈壘鍒拌鐏潌");
         }
         // 鍒犻櫎鐏潌缁戝畾鍏崇郴
-        poleBindingService.remove(Wrappers.<PoleBinding>lambdaQuery().eq(PoleBinding::getPoleId, poleId));
+        poleBindingService.remove(Wrappers.<PoleBinding>lambdaQuery().in(PoleBinding::getPoleId, poleIds));
         SpringContextHolder.getBean(LightTaskPoleRelationService.class)
-                .remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).eq(LightTaskPoleRelation::getPoleId, poleId));
+                .remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).in(LightTaskPoleRelation::getPoleId, poleIds));
 
         /**
          * 鍒犻櫎鐏潌鏃ュ織璁板綍寮�濮�
          */
-        String content = "{鐏潌Code锛�" + pole.getDeviceCode() + "锛� 鐏潌鍚嶇О锛�" + pole.getPoleName() + " }";
+        String content = "{鐏潌id锛�" + poles + " }";
 
         StoreOperationRecordsUtils.storeOperationData(null, null, "鍒犻櫎鐏潌", content);
         /**
          * 鍒犻櫎鐏潌鏃ュ織璁板綍缁撴潫
          */
-        return removeById(poleId);
+        return removeByIds(poleIds);
     }
 
 
@@ -1338,7 +1338,7 @@
         //璁剧疆瑙﹀彂鏉′欢    瀛樺叆Redis  15鍒嗛挓瓒呮椂   15鍒嗛挓鍐呭啀娆¤皟鐢ㄧ洿鎺ヨ繑鍥�
         redisUtils.set("redisStatusKeyTimeout", System.currentTimeMillis(), 60 * 15);
 
-        CountDownLatch countDownLatch = new CountDownLatch(7);//todo
+        CountDownLatch countDownLatch = new CountDownLatch(7);//todo 鍑犱釜璁惧璁剧疆涓哄嚑
         //鑾峰彇涓�涓�7浣嶉殢鏈烘暟
         String str = RandomStringUtils.randomAlphanumeric(7);
         countDownLatchUtil.push(str, countDownLatch);

--
Gitblit v1.9.3