From 8c4a723ff13e34152934b84c52267615c4e0fb8b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 06 十二月 2024 10:22:34 +0800
Subject: [PATCH] 升级模拟器增加上报81数据,为上报阀门状态,用81数据代替心跳

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/aop/SsoPowerAspect.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/aop/SsoPowerAspect.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/aop/SsoPowerAspect.java
index a9423ed..0458c3f 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/aop/SsoPowerAspect.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/aop/SsoPowerAspect.java
@@ -121,7 +121,6 @@
                     .queryParam("anyPower", (Object) anyPower)
                     .build()
                     .toUriString();
-            // 鐢变簬鑾峰彇student鎺ュ彛鍜变滑璁剧疆浜哹asicauth锛屾墍浠ラ渶瑕佸湪璇锋眰鏃堕厤缃�
             HttpHeaders headers = new HttpHeaders();
             HttpEntity<?> httpEntity = new HttpEntity<>(headers);
             ResponseEntity<SsoVo> response = null;
@@ -130,9 +129,13 @@
                 response = restTemplate.exchange(url, HttpMethod.GET, httpEntity, SsoVo.class);
             } catch (Exception e) {
                 e.printStackTrace();
+                return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛岃闂崟鐐圭櫥褰曠郴缁熷紓甯�");
             }
-            assert response != null;
-            return response.getBody();
+            if(response == null){
+                return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛岃闂崟鐐圭櫥褰曠郴缁熷紓甯�");
+            }else{
+                return response.getBody();
+            }
         }else {
             return BaseResponseUtils.buildError("鍚庣绯荤粺鍑洪敊锛屾湭寰楀埌SsoCheckUrl");
         }

--
Gitblit v1.8.0