From 8a5b6b092754685b4da940d2a35a855832f92465 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 22 四月 2022 16:10:46 +0800
Subject: [PATCH] fix

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
index b060adc..e4a1a47 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
@@ -120,11 +120,11 @@
     public ResponseVO<Object> bindPole(@PathVariable Long poleId, @RequestBody @Validated PoleBindingParam param) {
         boolean result = poleService.bindPole(poleId, param);
         if (result) {
-            //璁惧绫诲瀷锛�0璺伅锛�1led灞忓箷锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�9涓�閿晳鍔�
+            //璁惧绫诲瀷锛�0璺伅锛�1nove锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�9涓�閿晳鍔�, 10鐔欒
             switch (param.getDeviceType()) {
                 case 0:
                     Pole pole = poleService.getById(poleId);
-                    if (!pole.getDeviceCode().equals(param.getDeviceCode())) {
+                    if (pole != null) {
                         pole.setPoleName(param.getDeviceName());
                         pole.setDeviceCode(param.getDeviceCode());
                         poleService.updateById(pole);
@@ -150,6 +150,8 @@
                     break;
                 case 9:
                     break;
+                case 10:
+                    break;
                 default:
                     break;
             }
@@ -164,10 +166,10 @@
      * 鐏潌缁戝畾璁惧
      */
     @PostMapping("/unBind/{poleId}")
-    public ResponseVO<Object> unBindPole(@PathVariable Long poleId, @RequestBody @Validated PoleBindingParam param) {
+    public ResponseVO<Object> unBindPole(@PathVariable Long poleId, @RequestBody PoleBindingParam param) {
         boolean result = poleService.unBindPole(poleId, param.getDeviceCode());
         if (result) {
-            //璁惧绫诲瀷锛�0璺伅锛�1led灞忓箷锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�9涓�閿晳鍔�
+            //璁惧绫诲瀷锛�0璺伅锛�1led灞忓箷锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�9涓�閿晳鍔�, 10鐔欒
             switch (param.getDeviceType()) {
                 case 0:
                     break;
@@ -191,6 +193,8 @@
                     break;
                 case 9:
                     break;
+                case 10:
+                    break;
                 default:
                     break;
             }

--
Gitblit v1.9.3